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

Side by Side Diff: chrome/browser/safe_browsing/ping_manager.cc

Issue 2505153002: Add support for scout to 'ext' param when creating SafeBrowsing ping URLs. (Closed)
Patch Set: Go back to IsExtendedReportingEnabled where level doesn't matter Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/safe_browsing/ping_manager.h" 5 #include "chrome/browser/safe_browsing/ping_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 GURL SafeBrowsingPingManager::SafeBrowsingHitUrl( 212 GURL SafeBrowsingPingManager::SafeBrowsingHitUrl(
213 const safe_browsing::HitReport& hit_report) const { 213 const safe_browsing::HitReport& hit_report) const {
214 DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE || 214 DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE ||
215 hit_report.threat_type == SB_THREAT_TYPE_URL_PHISHING || 215 hit_report.threat_type == SB_THREAT_TYPE_URL_PHISHING ||
216 hit_report.threat_type == SB_THREAT_TYPE_URL_UNWANTED || 216 hit_report.threat_type == SB_THREAT_TYPE_URL_UNWANTED ||
217 hit_report.threat_type == SB_THREAT_TYPE_BINARY_MALWARE_URL || 217 hit_report.threat_type == SB_THREAT_TYPE_BINARY_MALWARE_URL ||
218 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL || 218 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL ||
219 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL); 219 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL);
220 std::string url = SafeBrowsingProtocolManagerHelper::ComposeUrl( 220 std::string url = SafeBrowsingProtocolManagerHelper::ComposeUrl(
221 url_prefix_, "report", client_name_, version_, std::string(), 221 url_prefix_, "report", client_name_, version_, std::string(),
222 hit_report.is_extended_reporting); 222 hit_report.extended_reporting_level);
223 223
224 std::string threat_list = "none"; 224 std::string threat_list = "none";
225 switch (hit_report.threat_type) { 225 switch (hit_report.threat_type) {
226 case SB_THREAT_TYPE_URL_MALWARE: 226 case SB_THREAT_TYPE_URL_MALWARE:
227 threat_list = "malblhit"; 227 threat_list = "malblhit";
228 break; 228 break;
229 case SB_THREAT_TYPE_URL_PHISHING: 229 case SB_THREAT_TYPE_URL_PHISHING:
230 threat_list = "phishblhit"; 230 threat_list = "phishblhit";
231 break; 231 break;
232 case SB_THREAT_TYPE_URL_UNWANTED: 232 case SB_THREAT_TYPE_URL_UNWANTED:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 version_.c_str()); 299 version_.c_str());
300 std::string api_key = google_apis::GetAPIKey(); 300 std::string api_key = google_apis::GetAPIKey();
301 if (!api_key.empty()) { 301 if (!api_key.empty()) {
302 base::StringAppendF(&url, "&key=%s", 302 base::StringAppendF(&url, "&key=%s",
303 net::EscapeQueryParamValue(api_key, true).c_str()); 303 net::EscapeQueryParamValue(api_key, true).c_str());
304 } 304 }
305 return GURL(url); 305 return GURL(url);
306 } 306 }
307 307
308 } // namespace safe_browsing 308 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/local_database_manager.cc ('k') | chrome/browser/safe_browsing/ping_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698