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

Side by Side Diff: chrome/browser/download/download_safe_browsing_client.cc

Issue 6935032: Include full redirect chain in downloads safebrowsing ping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 5
6 #include "chrome/browser/download/download_safe_browsing_client.h" 6 #include "chrome/browser/download/download_safe_browsing_client.h"
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 UpdateDownloadCheckStats(DOWNLOAD_HASH_CHECKS_TOTAL); 151 UpdateDownloadCheckStats(DOWNLOAD_HASH_CHECKS_TOTAL);
152 if (is_dangerous) { 152 if (is_dangerous) {
153 UpdateDownloadCheckStats(DOWNLOAD_HASH_CHECKS_MALWARE); 153 UpdateDownloadCheckStats(DOWNLOAD_HASH_CHECKS_MALWARE);
154 ReportMalware(result); 154 ReportMalware(result);
155 } 155 }
156 } 156 }
157 } 157 }
158 158
159 void DownloadSBClient::ReportMalware( 159 void DownloadSBClient::ReportMalware(
160 SafeBrowsingService::UrlCheckResult result) { 160 SafeBrowsingService::UrlCheckResult result) {
161 sb_service_->ReportSafeBrowsingHit(url_chain_.back(), // malicious_url 161 sb_service_->ReportSafeBrowsingHitWithChain(url_chain_,
162 url_chain_.front(), // page_url 162 referrer_url_,
163 referrer_url_, 163 true,
164 true, 164 result);
165 result);
166 } 165 }
167 166
168 void DownloadSBClient::UpdateDownloadCheckStats(SBStatsType stat_type) { 167 void DownloadSBClient::UpdateDownloadCheckStats(SBStatsType stat_type) {
169 UMA_HISTOGRAM_ENUMERATION("SB2.DownloadChecks", 168 UMA_HISTOGRAM_ENUMERATION("SB2.DownloadChecks",
170 stat_type, 169 stat_type,
171 DOWNLOAD_CHECKS_MAX); 170 DOWNLOAD_CHECKS_MAX);
172 } 171 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/protocol_manager.h » ('j') | chrome/browser/safe_browsing/protocol_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698