diff options
author | dcheng <dcheng@chromium.org> | 2014-10-21 17:46:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-22 04:03:14 +0000 |
commit | 2bcca5574426bd380d58a7d4ed2ac206b447eb3e (patch) | |
tree | bb2388aaf74310e16fc21229770876d90aa22f88 /chrome/browser/safe_browsing/safe_browsing_database.h | |
parent | ba1acbb6fd858192298dd2d9eba8298cd94c2948 (diff) | |
download | chromium_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_database.h')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database.h | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h index 17aad1d..3e2ca8d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database.h +++ b/chrome/browser/safe_browsing/safe_browsing_database.h @@ -287,42 +287,37 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { // useds Sqlite. SafeBrowsingDatabaseNew(); - virtual ~SafeBrowsingDatabaseNew(); + ~SafeBrowsingDatabaseNew() override; // Implement SafeBrowsingDatabase interface. - virtual void Init(const base::FilePath& filename) override; - virtual bool ResetDatabase() override; - virtual bool ContainsBrowseUrl( - const GURL& url, - std::vector<SBPrefix>* prefix_hits, - std::vector<SBFullHashResult>* cache_hits) override; - virtual bool ContainsDownloadUrl(const std::vector<GURL>& urls, - std::vector<SBPrefix>* prefix_hits) override; - virtual bool ContainsCsdWhitelistedUrl(const GURL& url) override; - virtual bool ContainsDownloadWhitelistedUrl(const GURL& url) override; - virtual bool ContainsDownloadWhitelistedString( - const std::string& str) override; - virtual bool ContainsExtensionPrefixes( - const std::vector<SBPrefix>& prefixes, - std::vector<SBPrefix>* prefix_hits) override; - virtual bool ContainsSideEffectFreeWhitelistUrl(const GURL& url) override; - virtual bool ContainsMalwareIP(const std::string& ip_address) override; - virtual bool UpdateStarted(std::vector<SBListChunkRanges>* lists) override; - virtual void InsertChunks(const std::string& list_name, - const std::vector<SBChunkData*>& chunks) override; - virtual void DeleteChunks( - const std::vector<SBChunkDelete>& chunk_deletes) override; - virtual void UpdateFinished(bool update_succeeded) override; - virtual void CacheHashResults( - const std::vector<SBPrefix>& prefixes, - const std::vector<SBFullHashResult>& full_hits, - const base::TimeDelta& cache_lifetime) override; + void Init(const base::FilePath& filename) override; + bool ResetDatabase() override; + bool ContainsBrowseUrl(const GURL& url, + std::vector<SBPrefix>* prefix_hits, + std::vector<SBFullHashResult>* cache_hits) override; + bool ContainsDownloadUrl(const std::vector<GURL>& urls, + std::vector<SBPrefix>* prefix_hits) override; + bool ContainsCsdWhitelistedUrl(const GURL& url) override; + bool ContainsDownloadWhitelistedUrl(const GURL& url) override; + bool ContainsDownloadWhitelistedString(const std::string& str) override; + bool ContainsExtensionPrefixes(const std::vector<SBPrefix>& prefixes, + std::vector<SBPrefix>* prefix_hits) override; + bool ContainsSideEffectFreeWhitelistUrl(const GURL& url) override; + bool ContainsMalwareIP(const std::string& ip_address) override; + bool UpdateStarted(std::vector<SBListChunkRanges>* lists) override; + void InsertChunks(const std::string& list_name, + const std::vector<SBChunkData*>& chunks) override; + void DeleteChunks(const std::vector<SBChunkDelete>& chunk_deletes) override; + void UpdateFinished(bool update_succeeded) override; + void CacheHashResults(const std::vector<SBPrefix>& prefixes, + const std::vector<SBFullHashResult>& full_hits, + const base::TimeDelta& cache_lifetime) override; // Returns the value of malware_kill_switch_; - virtual bool IsMalwareIPMatchKillSwitchOn() override; + bool IsMalwareIPMatchKillSwitchOn() override; // Returns true if the CSD whitelist has everything whitelisted. - virtual bool IsCsdWhitelistKillSwitchOn() override; + bool IsCsdWhitelistKillSwitchOn() override; private: friend class SafeBrowsingDatabaseTest; |