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

Unified Diff: chrome/browser/safe_browsing/protocol_manager.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/safe_browsing/protocol_manager.cc
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
index 52a2927719c567b38ed9ab822032f4380648708c..37ae77d86384fca0a359e3eb0f5733a10529c72e 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -649,13 +649,17 @@ void SafeBrowsingProtocolManager::ReportSafeBrowsingHit(
const GURL& page_url,
const GURL& referrer_url,
bool is_subresource,
- SafeBrowsingService::UrlCheckResult threat_type) {
+ SafeBrowsingService::UrlCheckResult threat_type,
+ const std::string& post_data) {
GURL report_url = SafeBrowsingHitUrl(malicious_url, page_url,
referrer_url, is_subresource,
threat_type);
- URLFetcher* report = new URLFetcher(report_url, URLFetcher::GET, this);
+ URLFetcher* report = new URLFetcher(
+ report_url, post_data.empty() ? URLFetcher::GET : URLFetcher::POST, this);
report->set_load_flags(net::LOAD_DISABLE_CACHE);
report->set_request_context(request_context_getter_);
+ if (!post_data.empty())
+ report->set_upload_data("text/plain", post_data);
report->Start();
safebrowsing_reports_.insert(report);
}
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.h ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698