#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
-#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/browser_context.h"
#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_utils.h"
#include "net/base/load_flags.h"
#include "net/base/net_log.h"
#include "net/dns/host_resolver.h"
explicit FakeSafeBrowsingService(const std::string& url_prefix)
: url_prefix_(url_prefix) {}
- virtual SafeBrowsingProtocolConfig GetProtocolConfig() const OVERRIDE {
+ SafeBrowsingProtocolConfig GetProtocolConfig() const override {
SafeBrowsingProtocolConfig config;
config.url_prefix = url_prefix_;
// Makes sure the auto update is not triggered. The tests will force the
}
private:
- virtual ~FakeSafeBrowsingService() {}
+ ~FakeSafeBrowsingService() override {}
std::string url_prefix_;
explicit TestSafeBrowsingServiceFactory(const std::string& url_prefix)
: url_prefix_(url_prefix) {}
- virtual SafeBrowsingService* CreateSafeBrowsingService() OVERRIDE {
+ SafeBrowsingService* CreateSafeBrowsingService() override {
return new FakeSafeBrowsingService(url_prefix_);
}
is_checked_url_safe_(false) {
}
- virtual ~SafeBrowsingServerTest() {
- }
+ ~SafeBrowsingServerTest() override {}
void UpdateSafeBrowsingStatus() {
ASSERT_TRUE(safe_browsing_service_);
return safe_browsing_service_ != NULL;
}
- virtual void SetUp() OVERRIDE {
+ void SetUp() override {
base::FilePath datafile_path;
ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &datafile_path));
InProcessBrowserTest::SetUp();
}
- virtual void TearDown() OVERRIDE {
+ void TearDown() override {
InProcessBrowserTest::TearDown();
SafeBrowsingService::RegisterFactory(NULL);
}
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ void SetUpCommandLine(CommandLine* command_line) override {
// This test uses loopback. No need to use IPv6 especially it makes
// local requests slow on Windows trybot when ipv6 local address [::1]
// is not setup.
}
// Callbacks for SafeBrowsingDatabaseManager::Client.
- virtual void OnCheckBrowseUrlResult(const GURL& url,
- SBThreatType threat_type,
- const std::string& metadata) OVERRIDE {
+ void OnCheckBrowseUrlResult(const GURL& url,
+ SBThreatType threat_type,
+ const std::string& metadata) override {
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
EXPECT_TRUE(safe_browsing_test_->is_checked_url_in_db());
safe_browsing_test_->set_is_checked_url_safe(
}
// Callback for URLFetcher.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE {
+ void OnURLFetchComplete(const net::URLFetcher* source) override {
source->GetResponseAsString(&response_data_);
response_status_ = source->GetStatus().status();
StopUILoop();
private:
friend class base::RefCountedThreadSafe<SafeBrowsingServerTestHelper>;
- virtual ~SafeBrowsingServerTestHelper() {}
+ ~SafeBrowsingServerTestHelper() override {}
// Stops UI loop after desired status is updated.
void StopUILoop() {