| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |