Report malware redirectors as well.
BUG=none
TEST=unit_tests
Review URL: http://codereview.chromium.org/3028040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55966 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
index 23ed348..611349b 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -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 {