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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_host.cc

Issue 2927123004: Enable client side phishing detection on https sites. (Closed)
Patch Set: address nparker's comments Created 3 years, 6 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_host_unittest.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_host.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 838bc9dd920e488eda7236efc83c785606b34673..fd293fd1dc106753b4d6d3992cf05ae2dfde4c00 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -110,12 +110,12 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest
DontClassifyForMalware(NO_CLASSIFY_PRIVATE_IP);
}
- // For phishing we only classify HTTP pages.
- if (!url_.SchemeIs(url::kHttpScheme)) {
+ // For phishing we only classify HTTP or HTTPS pages.
+ if (!url_.SchemeIsHTTPOrHTTPS()) {
DVLOG(1) << "Skipping phishing classification for URL: " << url_
- << " because it is not HTTP: "
+ << " because it is not HTTP or HTTPS: "
<< socket_address_.host();
- DontClassifyForPhishing(NO_CLASSIFY_NOT_HTTP_URL);
+ DontClassifyForPhishing(NO_CLASSIFY_SCHEME_NOT_SUPPORTED);
}
// Don't run any classifier if the tab is incognito.
@@ -156,17 +156,18 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest
// Enum used to keep stats about why the pre-classification check failed.
enum PreClassificationCheckFailures {
- OBSOLETE_NO_CLASSIFY_PROXY_FETCH,
- NO_CLASSIFY_PRIVATE_IP,
- NO_CLASSIFY_OFF_THE_RECORD,
- NO_CLASSIFY_MATCH_CSD_WHITELIST,
- NO_CLASSIFY_TOO_MANY_REPORTS,
- NO_CLASSIFY_UNSUPPORTED_MIME_TYPE,
- NO_CLASSIFY_NO_DATABASE_MANAGER,
- NO_CLASSIFY_KILLSWITCH,
- NO_CLASSIFY_CANCEL,
- NO_CLASSIFY_RESULT_FROM_CACHE,
- NO_CLASSIFY_NOT_HTTP_URL,
+ OBSOLETE_NO_CLASSIFY_PROXY_FETCH = 0,
+ NO_CLASSIFY_PRIVATE_IP = 1,
+ NO_CLASSIFY_OFF_THE_RECORD = 2,
+ NO_CLASSIFY_MATCH_CSD_WHITELIST = 3,
+ NO_CLASSIFY_TOO_MANY_REPORTS = 4,
+ NO_CLASSIFY_UNSUPPORTED_MIME_TYPE = 5,
+ NO_CLASSIFY_NO_DATABASE_MANAGER = 6,
+ NO_CLASSIFY_KILLSWITCH = 7,
+ NO_CLASSIFY_CANCEL = 8,
+ NO_CLASSIFY_RESULT_FROM_CACHE = 9,
+ DEPRECATED_NO_CLASSIFY_NOT_HTTP_URL = 10,
+ NO_CLASSIFY_SCHEME_NOT_SUPPORTED = 11,
NO_CLASSIFY_MAX // Always add new values before this one.
};
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698