Chromium Code Reviews| 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 127bf5cd5ffc8d2c3d41f8aa5363f3f8804dea90..fec2bdf65c04fa108f0344752dc83666b219ce19 100644 |
| --- a/chrome/browser/safe_browsing/protocol_manager.cc |
| +++ b/chrome/browser/safe_browsing/protocol_manager.cc |
| @@ -660,6 +660,26 @@ void SafeBrowsingProtocolManager::ReportSafeBrowsingHit( |
| safebrowsing_reports_.insert(report); |
| } |
| +void SafeBrowsingProtocolManager::ReportSafeBrowsingHitWithChain( |
| + const std::vector<GURL>& url_chain, |
| + const GURL& referrer_url, |
| + bool is_subresource, |
| + SafeBrowsingService::UrlCheckResult threat_type) { |
| + std::string post_data; |
| + for (size_t i = 0; i < url_chain.size(); ++i) |
| + post_data += url_chain[i].spec() + "\n"; |
| + |
| + GURL report_url = SafeBrowsingHitUrl(url_chain.back(), url_chain.front(), |
|
noelutz
2011/05/06 04:24:12
Do you ever check that there is at least one eleme
panayiotis
2011/05/09 19:44:16
A check would be nice yes.
On 2011/05/06 04:24:1
mattm
2011/05/10 02:26:09
Added a DCHECK to DownloadSBClient constructor
|
| + referrer_url, is_subresource, |
| + threat_type); |
| + URLFetcher* report = new URLFetcher(report_url, URLFetcher::POST, this); |
| + report->set_load_flags(net::LOAD_DISABLE_CACHE); |
| + report->set_request_context(request_context_getter_); |
| + report->set_upload_data("text/plain", post_data); |
| + report->Start(); |
| + safebrowsing_reports_.insert(report); |
| +} |
| + |
| // Sends malware details for users who opt-in. |
| void SafeBrowsingProtocolManager::ReportMalwareDetails( |
| const std::string& report) { |