summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_test.cc
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-21 17:46:21 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-22 04:03:14 +0000
commit2bcca5574426bd380d58a7d4ed2ac206b447eb3e (patch)
treebb2388aaf74310e16fc21229770876d90aa22f88 /chrome/browser/safe_browsing/safe_browsing_test.cc
parentba1acbb6fd858192298dd2d9eba8298cd94c2948 (diff)
downloadchromium_src-2bcca5574426bd380d58a7d4ed2ac206b447eb3e.zip
chromium_src-2bcca5574426bd380d58a7d4ed2ac206b447eb3e.tar.gz
chromium_src-2bcca5574426bd380d58a7d4ed2ac206b447eb3e.tar.bz2
Standardize usage of virtual/override/final in chrome/browser/safe_browsing/
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=mattm@chromium.org Review URL: https://codereview.chromium.org/657373004 Cr-Commit-Position: refs/heads/master@{#300586}
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_test.cc')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_test.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc
index 21f6ec2..273a086 100644
--- a/chrome/browser/safe_browsing/safe_browsing_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_test.cc
@@ -112,7 +112,7 @@ class FakeSafeBrowsingService : public SafeBrowsingService {
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
@@ -126,7 +126,7 @@ class FakeSafeBrowsingService : public SafeBrowsingService {
}
private:
- virtual ~FakeSafeBrowsingService() {}
+ ~FakeSafeBrowsingService() override {}
std::string url_prefix_;
@@ -139,7 +139,7 @@ class TestSafeBrowsingServiceFactory : public SafeBrowsingServiceFactory {
explicit TestSafeBrowsingServiceFactory(const std::string& url_prefix)
: url_prefix_(url_prefix) {}
- virtual SafeBrowsingService* CreateSafeBrowsingService() override {
+ SafeBrowsingService* CreateSafeBrowsingService() override {
return new FakeSafeBrowsingService(url_prefix_);
}
@@ -281,7 +281,7 @@ class SafeBrowsingServerTest : public InProcessBrowserTest {
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.
@@ -349,9 +349,9 @@ class SafeBrowsingServerTestHelper
}
// 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(
@@ -453,7 +453,7 @@ class SafeBrowsingServerTestHelper
}
// 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();
@@ -465,7 +465,7 @@ class SafeBrowsingServerTestHelper
private:
friend class base::RefCountedThreadSafe<SafeBrowsingServerTestHelper>;
- virtual ~SafeBrowsingServerTestHelper() {}
+ ~SafeBrowsingServerTestHelper() override {}
// Stops UI loop after desired status is updated.
void StopUILoop() {