Index: chrome/browser/download/download_safe_browsing_client.cc |
diff --git a/chrome/browser/download/download_safe_browsing_client.cc b/chrome/browser/download/download_safe_browsing_client.cc |
index 3e0577c0241371f9316f94d4346504d26ef1efad..36cf5fb28b436efe9b2337180cdb37a428380c31 100644 |
--- a/chrome/browser/download/download_safe_browsing_client.cc |
+++ b/chrome/browser/download/download_safe_browsing_client.cc |
@@ -28,6 +28,7 @@ DownloadSBClient::DownloadSBClient(int32 download_id, |
url_chain_(url_chain), |
referrer_url_(referrer_url) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(!url_chain.empty()); |
ResourceDispatcherHost* rdh = g_browser_process->resource_dispatcher_host(); |
if (rdh) |
sb_service_ = rdh->safe_browsing_service(); |
@@ -158,11 +159,16 @@ void DownloadSBClient::SafeBrowsingCheckHashDone( |
void DownloadSBClient::ReportMalware( |
SafeBrowsingService::UrlCheckResult result) { |
+ std::string post_data; |
+ for (size_t i = 0; i < url_chain_.size(); ++i) |
+ post_data += url_chain_[i].spec() + "\n"; |
+ |
sb_service_->ReportSafeBrowsingHit(url_chain_.back(), // malicious_url |
url_chain_.front(), // page_url |
referrer_url_, |
true, |
- result); |
+ result, |
+ post_data); |
} |
void DownloadSBClient::UpdateDownloadCheckStats(SBStatsType stat_type) { |