From ee4d3e80cfae83eeffe4e3f0c0d35ee5840ad575 Mon Sep 17 00:00:00 2001 From: "panayiotis@google.com" Date: Thu, 12 Aug 2010 23:59:51 +0000 Subject: 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 --- chrome/browser/safe_browsing/protocol_manager.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to '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 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::OnChunkInserted() { 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::MacKeyUrl() const { 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 { -- cgit v1.1