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

Side by Side Diff: chrome/browser/safe_browsing/protocol_manager_helper.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/protocol_manager_helper.h" 5 #include "chrome/browser/safe_browsing/protocol_manager_helper.h"
6 6
7 #ifndef NDEBUG 7 #ifndef NDEBUG
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #endif 9 #endif
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return url; 59 return url;
60 } 60 }
61 61
62 // static 62 // static
63 std::string SafeBrowsingProtocolManagerHelper::ComposeUrl( 63 std::string SafeBrowsingProtocolManagerHelper::ComposeUrl(
64 const std::string& prefix, 64 const std::string& prefix,
65 const std::string& method, 65 const std::string& method,
66 const std::string& client_name, 66 const std::string& client_name,
67 const std::string& version, 67 const std::string& version,
68 const std::string& additional_query, 68 const std::string& additional_query,
69 bool is_extended_reporting) { 69 ExtendedReportingLevel reporting_level) {
70 std::string url = 70 std::string url =
71 ComposeUrl(prefix, method, client_name, version, additional_query); 71 ComposeUrl(prefix, method, client_name, version, additional_query);
72 if (is_extended_reporting) { 72 url.append(base::StringPrintf("&ext=%d", reporting_level));
73 url.append("&ext=1");
74 } else {
75 url.append("&ext=0");
76 }
77 return url; 73 return url;
78 } 74 }
79 75
80 } // namespace safe_browsing 76 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager_helper.h ('k') | chrome/browser/safe_browsing/protocol_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698