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

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

Issue 3028040: Report malware redirectors as well. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
===================================================================
--- chrome/browser/safe_browsing/protocol_manager.cc (revision 55938)
+++ chrome/browser/safe_browsing/protocol_manager.cc (working copy)
@@ -589,8 +589,10 @@
void SafeBrowsingProtocolManager::ReportMalware(const GURL& malware_url,
const GURL& page_url,
- const GURL& referrer_url) {
- GURL report_url = MalwareReportUrl(malware_url, page_url, referrer_url);
+ const GURL& referrer_url,
+ bool is_subresource) {
+ GURL report_url = MalwareReportUrl(malware_url, page_url, referrer_url,
+ is_subresource);
URLFetcher* report = new URLFetcher(report_url, URLFetcher::GET, this);
report->set_load_flags(net::LOAD_DISABLE_CACHE);
report->set_request_context(request_context_getter_);
@@ -680,13 +682,14 @@
GURL SafeBrowsingProtocolManager::MalwareReportUrl(
const GURL& malware_url, const GURL& page_url,
- const GURL& referrer_url) const {
+ const GURL& referrer_url, bool is_subresource) const {
std::string url = ComposeUrl(info_url_prefix_, "report", client_name_,
version_, additional_query_);
- return GURL(StringPrintf("%s&evts=malblhit&evtd=%s&evtr=%s&evhr=%s",
+ return GURL(StringPrintf("%s&evts=malblhit&evtd=%s&evtr=%s&evhr=%s&evtb=%d",
url.c_str(), EscapeQueryParamValue(malware_url.spec(), true).c_str(),
EscapeQueryParamValue(page_url.spec(), true).c_str(),
- EscapeQueryParamValue(referrer_url.spec(), true).c_str()));
+ EscapeQueryParamValue(referrer_url.spec(), true).c_str(),
+ is_subresource));
}
GURL SafeBrowsingProtocolManager::NextChunkUrl(const std::string& url) const {
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.h ('k') | chrome/browser/safe_browsing/protocol_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698