Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: chrome/browser/safe_browsing/client_side_detection_service.h

Issue 7792004: Parse the whitelist expressions from the phishing verdict response if (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Brian's comments Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/client_side_detection_service.h
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index 002ced127b71f7bd89f06e88cfa14fedbcd13eb3..7afe1cdad53734f182727a2cb58f6be3ac7d5434 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -50,6 +50,7 @@ class URLRequestStatus;
namespace safe_browsing {
class ClientPhishingRequest;
+class ClientPhishingResponse;
class ClientSideModel;
class ClientSideDetectionService : public URLFetcher::Delegate,
@@ -167,6 +168,8 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest, SetEnabled);
FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest, IsBadIpAddress);
FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest,
+ IsFalsePositiveResponse);
+ FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest,
ModelHasValidHashIds);
FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest,
SanitizeRequestForPingback);
@@ -263,6 +266,12 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
// valid hashes in the model.
static bool ModelHasValidHashIds(const ClientSideModel& model);
+ // Returns true iff the response is phishing (phishy() is true) and if the
+ // given URL matches one of the whitelisted expressions in the given
+ // ClientPhishingResponse.
+ static bool IsFalsePositiveResponse(const GURL& url,
+ const ClientPhishingResponse& response);
+
// Whether the service is running or not. When the service is not running,
// it won't download the model nor report detected phishing URLs.
bool enabled_;
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698