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

Unified Diff: chrome/browser/download/download_safe_browsing_client.cc

Issue 6935032: Include full redirect chain in downloads safebrowsing ping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize url_chain in tests Created 9 years, 7 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/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) {
« no previous file with comments | « chrome/browser/download/download_manager_unittest.cc ('k') | chrome/browser/safe_browsing/protocol_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698