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

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

Issue 7538009: Send back the URL that matched the SafeBrowsing list with the CSD ping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Matt's comments. Created 9 years, 5 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
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 d88f8abcf44848673f89098dfcab05ac1224cefb..c3e85ca81713527a68549604bbc27e65f40ee025 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -352,6 +352,10 @@ void ClientSideDetectionHost::OnSafeBrowsingHit(
tab_contents()->controller().GetActiveEntry()) {
unsafe_unique_page_id_ =
tab_contents()->controller().GetActiveEntry()->unique_id();
+ // We also keep the resource around in order to be able to send the
+ // malicious URL to the server.
+ unsafe_resource_.reset(new SafeBrowsingService::UnsafeResource(resource));
+ unsafe_resource_->client = NULL; // Make sure we don't do anything stupid.
}
}
@@ -390,6 +394,9 @@ void ClientSideDetectionHost::OnPhishingDetectionDone(
// malware or phishing interstitial was shown but the user clicked
// through.
(verdict->is_phishing() || DidShowSBInterstitial())) {
+ if (DidShowSBInterstitial()) {
+ browse_info_->unsafe_resource.reset(unsafe_resource_.release());
+ }
// Start browser-side feature extraction. Once we're done it will send
// the client verdict request.
feature_extractor_->ExtractFeatures(

Powered by Google App Engine
This is Rietveld 408576698