Reviewers: vakh (Varun Khaneja), Nathan Parker
CL:
https://codereview.chromium.org/2927123004/Message:
A tiny CL to turn on CSD phishing detection on Https sites.
Description:
Enable client side phishing detection on https sites.
(Client side malware detection is already enabled on https).
BUG=730895
Affected files (+3, -11 lines):
M chrome/browser/safe_browsing/client_side_detection_host.cc
M chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
M tools/metrics/histograms/enums.xml
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..a3ec5533965b76b89ec9b365b9b6fe7e493ec2ad 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -110,14 +110,6 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest
DontClassifyForMalware(NO_CLASSIFY_PRIVATE_IP);
}
- // For phishing we only classify HTTP pages.
- if (!url_.SchemeIs(url::kHttpScheme)) {
- DVLOG(1) << "Skipping phishing classification for URL: " << url_
- << " because it is not HTTP: "
- << socket_address_.host();
- DontClassifyForPhishing(NO_CLASSIFY_NOT_HTTP_URL);
- }
-
// Don't run any classifier if the tab is incognito.
if (web_contents_->GetBrowserContext()->IsOffTheRecord()) {
DVLOG(1) << "Skipping phishing and malware classification for URL: "
@@ -166,7 +158,7 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest
NO_CLASSIFY_KILLSWITCH,
NO_CLASSIFY_CANCEL,
NO_CLASSIFY_RESULT_FROM_CACHE,
- NO_CLASSIFY_NOT_HTTP_URL,
+ DEPRECATED_NO_CLASSIFY_NOT_HTTP_URL,
NO_CLASSIFY_MAX // Always add new values before this one.
};
Index: chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index 05437fd9a0a1827fc43ed481771e2bcca924fe24..464cb9bd661a4a4ff11dcb4c73924dc65d3e4e60 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -1172,7 +1172,7 @@ TEST_F(ClientSideDetectionHostTest, TestPreClassificationCheckHttpsUrl) {
NavigateAndCommit(url);
WaitAndCheckPreClassificationChecks();
- ExpectStartPhishingDetection(NULL);
+ ExpectStartPhishingDetection(&url);
ExpectShouldClassifyForMalwareResult(true);
}
Index: tools/metrics/histograms/enums.xml
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 074632578aa956f3ca48f908026978c486f99772..a5d34ed3a68ba9d29225e761489f1f43c2f17405 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -31801,7 +31801,7 @@ from previous Chrome versions.
<int value="7" label="KILLSWITCH"/>
<int value="8" label="CANCEL"/>
<int value="9" label="RESULT_FROM_CACHE"/>
- <int value="10" label="NOT_HTTP_URL"/>
+ <int value="10" label="DEPRECATED: NOT_HTTP_URL"/>
</enum>
<enum name="SBClientDownloadCheckDownloadStats" type="int">