summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 21:16:56 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 21:16:56 +0000
commit2e307237a1b46143a491e4478d323febb1895c3e (patch)
tree3d9a90c1ec35ab72beb25ba7527f8ac7dd05cd47 /chrome/browser/safe_browsing
parent1a5492dff33222a8b36e30cc127f5bdda7f6888b (diff)
downloadchromium_src-2e307237a1b46143a491e4478d323febb1895c3e.zip
chromium_src-2e307237a1b46143a491e4478d323febb1895c3e.tar.gz
chromium_src-2e307237a1b46143a491e4478d323febb1895c3e.tar.bz2
Add OVERRIDE annotation to safebrowsing classes.
BUG=none TEST=trybots Review URL: http://codereview.chromium.org/7495021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc2
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.h10
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.h4
-rw-r--r--chrome/browser/safe_browsing/malware_details.h2
-rw-r--r--chrome/browser/safe_browsing/malware_details_cache.h2
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.h2
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.h2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.h13
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_file.h54
9 files changed, 48 insertions, 43 deletions
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 146af77..2224d7c 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -242,7 +242,7 @@ class CsdClient : public SafeBrowsingService::Client {
// Method from SafeBrowsingService::Client. This method is called on the
// IO thread once the interstitial is going away. This method simply deletes
// the CsdClient object.
- virtual void OnBlockingPageComplete(bool proceed) {
+ virtual void OnBlockingPageComplete(bool proceed) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
// Delete this on the UI thread since it was created there.
BrowserThread::PostTask(BrowserThread::UI,
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.h b/chrome/browser/safe_browsing/client_side_detection_host.h
index 1d0b15e..ba9af18 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.h
+++ b/chrome/browser/safe_browsing/client_side_detection_host.h
@@ -40,23 +40,23 @@ class ClientSideDetectionHost : public TabContentsObserver,
virtual ~ClientSideDetectionHost();
// From TabContentsObserver.
- virtual bool OnMessageReceived(const IPC::Message& message);
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// From TabContentsObserver. If we navigate away we cancel all pending
// callbacks that could show an interstitial, and check to see whether
// we should classify the new URL.
virtual void DidNavigateMainFramePostCommit(
const content::LoadCommittedDetails& details,
- const ViewHostMsg_FrameNavigate_Params& params);
+ const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE;
// Called when the SafeBrowsingService found a hit with one of the
// SafeBrowsing lists. This method is called on the UI thread.
virtual void OnSafeBrowsingHit(
- const SafeBrowsingService::UnsafeResource& resource);
+ const SafeBrowsingService::UnsafeResource& resource) OVERRIDE;
protected:
// From TabContentsObserver. Called when the TabContents is being destroyed.
- virtual void TabContentsDestroyed(TabContents* tab);
+ virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
private:
friend class ClientSideDetectionHostTest;
@@ -82,7 +82,7 @@ class ClientSideDetectionHost : public TabContentsObserver,
// method is called in the UI thread.
virtual void Observe(int type,
const NotificationSource& source,
- const NotificationDetails& details);
+ const NotificationDetails& details) OVERRIDE;
// Returns true if the user has seen a regular SafeBrowsing
// interstitial for the current page. This is only true if the user has
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index 3fb5e49..d2a2f33 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -71,12 +71,12 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
const net::URLRequestStatus& status,
int response_code,
const net::ResponseCookies& cookies,
- const std::string& data);
+ const std::string& data) OVERRIDE;
// NotificationObserver overrides:
virtual void Observe(int type,
const NotificationSource& source,
- const NotificationDetails& details);
+ const NotificationDetails& details) OVERRIDE;
// Sends a request to the SafeBrowsing servers with the ClientPhishingRequest.
// The URL scheme of the |url()| in the request should be HTTP. This method
diff --git a/chrome/browser/safe_browsing/malware_details.h b/chrome/browser/safe_browsing/malware_details.h
index 473eab8..d4036c6 100644
--- a/chrome/browser/safe_browsing/malware_details.h
+++ b/chrome/browser/safe_browsing/malware_details.h
@@ -66,7 +66,7 @@ class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
void OnRedirectionCollectionReady();
// TabContentsObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message);
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
protected:
friend class MalwareDetailsFactoryImpl;
diff --git a/chrome/browser/safe_browsing/malware_details_cache.h b/chrome/browser/safe_browsing/malware_details_cache.h
index 87b65c4..115eb1a 100644
--- a/chrome/browser/safe_browsing/malware_details_cache.h
+++ b/chrome/browser/safe_browsing/malware_details_cache.h
@@ -61,7 +61,7 @@ class MalwareDetailsCacheCollector
const net::URLRequestStatus& status,
int response_code,
const net::ResponseCookies& cookies,
- const std::string& data);
+ const std::string& data) OVERRIDE;
private:
// Points to the url for which we are fetching the HTTP cache entry or
diff --git a/chrome/browser/safe_browsing/malware_details_history.h b/chrome/browser/safe_browsing/malware_details_history.h
index 05523af..74d03fa 100644
--- a/chrome/browser/safe_browsing/malware_details_history.h
+++ b/chrome/browser/safe_browsing/malware_details_history.h
@@ -83,7 +83,7 @@ class MalwareDetailsRedirectsCollector
virtual void Observe(int type,
const NotificationSource& source,
- const NotificationDetails& details);
+ const NotificationDetails& details) OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(MalwareDetailsRedirectsCollector);
};
diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h
index bab7baa..98b2b1e 100644
--- a/chrome/browser/safe_browsing/protocol_manager.h
+++ b/chrome/browser/safe_browsing/protocol_manager.h
@@ -108,7 +108,7 @@ class SafeBrowsingProtocolManager : public URLFetcher::Delegate {
const net::URLRequestStatus& status,
int response_code,
const net::ResponseCookies& cookies,
- const std::string& data);
+ const std::string& data) OVERRIDE;
// API used by the SafeBrowsingService for issuing queries. When the results
// are available, SafeBrowsingService::HandleGetHashResults is called.
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
index c10ea86..0fdea90 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
@@ -68,16 +68,17 @@ class SafeBrowsingBlockingPage : public ChromeInterstitialPage {
}
// ChromeInterstitialPage method:
- virtual std::string GetHTMLContents();
- virtual void SetReportingPreference(bool report);
- virtual void Proceed();
- virtual void DontProceed();
+ virtual std::string GetHTMLContents() OVERRIDE;
+ virtual void Proceed() OVERRIDE;
+ virtual void DontProceed() OVERRIDE;
protected:
friend class SafeBrowsingBlockingPageTest;
// ChromeInterstitialPage method:
- virtual void CommandReceived(const std::string& command);
+ virtual void CommandReceived(const std::string& command) OVERRIDE;
+
+ void SetReportingPreference(bool report);
// Don't instanciate this class directly, use ShowBlockingPage instead.
SafeBrowsingBlockingPage(SafeBrowsingService* service,
@@ -91,6 +92,8 @@ class SafeBrowsingBlockingPage : public ChromeInterstitialPage {
int64 malware_details_proceed_delay_ms_;
private:
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, MalwareReports);
+
enum BlockingPageEvent {
SHOW,
PROCEED,
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.h b/chrome/browser/safe_browsing/safe_browsing_store_file.h
index 6061cd2..f5fb81a 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -110,46 +110,48 @@ class SafeBrowsingStoreFile : public SafeBrowsingStore {
virtual ~SafeBrowsingStoreFile();
virtual void Init(const FilePath& filename,
- Callback0::Type* corruption_callback);
+ Callback0::Type* corruption_callback) OVERRIDE;
// Delete any on-disk files, including the permanent storage.
- virtual bool Delete();
+ virtual bool Delete() OVERRIDE;
// Get all add hash prefixes and full-length hashes, respectively, from
// the store.
- virtual bool GetAddPrefixes(std::vector<SBAddPrefix>* add_prefixes);
- virtual bool GetAddFullHashes(std::vector<SBAddFullHash>* add_full_hashes);
+ virtual bool GetAddPrefixes(std::vector<SBAddPrefix>* add_prefixes) OVERRIDE;
+ virtual bool GetAddFullHashes(
+ std::vector<SBAddFullHash>* add_full_hashes) OVERRIDE;
- virtual bool BeginChunk();
+ virtual bool BeginChunk() OVERRIDE;
- virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix);
+ virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix) OVERRIDE;
virtual bool WriteAddHash(int32 chunk_id,
base::Time receive_time,
- const SBFullHash& full_hash);
+ const SBFullHash& full_hash) OVERRIDE;
virtual bool WriteSubPrefix(int32 chunk_id,
int32 add_chunk_id, SBPrefix prefix);
virtual bool WriteSubHash(int32 chunk_id, int32 add_chunk_id,
- const SBFullHash& full_hash);
- virtual bool FinishChunk();
+ const SBFullHash& full_hash) OVERRIDE;
+ virtual bool FinishChunk() OVERRIDE;
- virtual bool BeginUpdate();
+ virtual bool BeginUpdate() OVERRIDE;
// Store updates with pending add full hashes in file store and
// return |add_prefixes_result| and |add_full_hashes_result|.
- virtual bool FinishUpdate(const std::vector<SBAddFullHash>& pending_adds,
- const std::set<SBPrefix>& prefix_misses,
- std::vector<SBAddPrefix>* add_prefixes_result,
- std::vector<SBAddFullHash>* add_full_hashes_result);
- virtual bool CancelUpdate();
-
- virtual void SetAddChunk(int32 chunk_id);
- virtual bool CheckAddChunk(int32 chunk_id);
- virtual void GetAddChunks(std::vector<int32>* out);
- virtual void SetSubChunk(int32 chunk_id);
- virtual bool CheckSubChunk(int32 chunk_id);
- virtual void GetSubChunks(std::vector<int32>* out);
-
- virtual void DeleteAddChunk(int32 chunk_id);
- virtual void DeleteSubChunk(int32 chunk_id);
+ virtual bool FinishUpdate(
+ const std::vector<SBAddFullHash>& pending_adds,
+ const std::set<SBPrefix>& prefix_misses,
+ std::vector<SBAddPrefix>* add_prefixes_result,
+ std::vector<SBAddFullHash>* add_full_hashes_result) OVERRIDE;
+ virtual bool CancelUpdate() OVERRIDE;
+
+ virtual void SetAddChunk(int32 chunk_id) OVERRIDE;
+ virtual bool CheckAddChunk(int32 chunk_id) OVERRIDE;
+ virtual void GetAddChunks(std::vector<int32>* out) OVERRIDE;
+ virtual void SetSubChunk(int32 chunk_id) OVERRIDE;
+ virtual bool CheckSubChunk(int32 chunk_id) OVERRIDE;
+ virtual void GetSubChunks(std::vector<int32>* out) OVERRIDE;
+
+ virtual void DeleteAddChunk(int32 chunk_id) OVERRIDE;
+ virtual void DeleteSubChunk(int32 chunk_id) OVERRIDE;
// Returns the name of the temporary file used to buffer data for
// |filename|. Exported for unit tests.