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

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

Issue 6935032: Include full redirect chain in downloads safebrowsing ping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 0d9caf1eaef56572a58c8ba43644dd147f2a6d59..fcf11a84c7adc9c96693c64cd5a8239ea93a8094 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -1056,6 +1056,26 @@ void SafeBrowsingService::ReportSafeBrowsingHit(
threat_type));
}
+void SafeBrowsingService::ReportSafeBrowsingHitWithChain(
+ const std::vector<GURL>& url_chain,
+ const GURL& referrer_url,
+ bool is_subresource,
+ SafeBrowsingService::UrlCheckResult threat_type) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (!CanReportStats())
+ return;
+
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ this,
+ &SafeBrowsingService::ReportSafeBrowsingHitWithChainOnIOThread,
+ url_chain,
+ referrer_url,
+ is_subresource,
+ threat_type));
+}
+
void SafeBrowsingService::ReportSafeBrowsingHitOnIOThread(
const GURL& malicious_url,
const GURL& page_url,
@@ -1074,6 +1094,23 @@ void SafeBrowsingService::ReportSafeBrowsingHitOnIOThread(
threat_type);
}
+void SafeBrowsingService::ReportSafeBrowsingHitWithChainOnIOThread(
+ const std::vector<GURL>& url_chain,
+ const GURL& referrer_url,
+ bool is_subresource,
+ SafeBrowsingService::UrlCheckResult threat_type) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ if (!enabled_)
+ return;
+
+ DVLOG(1) << "ReportSafeBrowsingHitWithChain: " << url_chain.size()
+ << " " << url_chain.back() << " " << url_chain.front()
+ << " " << referrer_url << " " << is_subresource
+ << " " << threat_type;
+ protocol_manager_->ReportSafeBrowsingHitWithChain(
+ url_chain, referrer_url, is_subresource, threat_type);
+}
+
// If the user had opted-in to send MalwareDetails, this gets called
// when the report is ready.
void SafeBrowsingService::SendSerializedMalwareDetails(

Powered by Google App Engine
This is Rietveld 408576698