| 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(
|
|
|