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

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

Issue 1655113002: Add a new ThreatSource type to indicate SBHit is from client side detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit_tests and histogram Created 4 years, 11 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 f7cb75049e443c4c10e1e4c1ac61b367c8ea44db..7b427a586ff424d36dee818427eb5e83c2ce7313 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -555,6 +555,8 @@ void ClientSideDetectionHost::MaybeShowPhishingWarning(GURL phishing_url,
resource.original_url = phishing_url;
resource.is_subresource = false;
resource.threat_type = SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL;
+ resource.threat_source =
+ safe_browsing::ThreatSource::CLIENT_SIDE_DETECTION;
resource.render_process_host_id =
web_contents()->GetRenderProcessHost()->GetID();
resource.render_frame_id = web_contents()->GetMainFrame()->GetRoutingID();
@@ -585,6 +587,8 @@ void ClientSideDetectionHost::MaybeShowMalwareWarning(GURL original_url,
resource.original_url = original_url;
resource.is_subresource = (malware_url.host() != original_url.host());
resource.threat_type = SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL;
+ resource.threat_source =
+ safe_browsing::ThreatSource::CLIENT_SIDE_DETECTION;
resource.render_process_host_id =
web_contents()->GetRenderProcessHost()->GetID();
resource.render_frame_id = web_contents()->GetMainFrame()->GetRoutingID();
« 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