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" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "components/version_info/version_info.h" | 15 #include "components/version_info/version_info.h" |
16 #include "google_apis/google_api_keys.h" | 16 #include "google_apis/google_api_keys.h" |
17 #include "net/base/escape.h" | 17 #include "net/base/escape.h" |
18 | 18 |
| 19 namespace safe_browsing { |
| 20 |
19 SafeBrowsingProtocolConfig::SafeBrowsingProtocolConfig() | 21 SafeBrowsingProtocolConfig::SafeBrowsingProtocolConfig() |
20 : disable_auto_update(false) {} | 22 : disable_auto_update(false) {} |
21 | 23 |
22 SafeBrowsingProtocolConfig::~SafeBrowsingProtocolConfig() {} | 24 SafeBrowsingProtocolConfig::~SafeBrowsingProtocolConfig() {} |
23 | 25 |
24 // static | 26 // static |
25 std::string SafeBrowsingProtocolManagerHelper::Version() { | 27 std::string SafeBrowsingProtocolManagerHelper::Version() { |
26 if (version_info::GetVersionNumber().empty()) | 28 if (version_info::GetVersionNumber().empty()) |
27 return "0.1"; | 29 return "0.1"; |
28 else | 30 else |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool is_extended_reporting) { | 66 bool is_extended_reporting) { |
65 std::string url = | 67 std::string url = |
66 ComposeUrl(prefix, method, client_name, version, additional_query); | 68 ComposeUrl(prefix, method, client_name, version, additional_query); |
67 if (is_extended_reporting) { | 69 if (is_extended_reporting) { |
68 url.append("&ext=1"); | 70 url.append("&ext=1"); |
69 } else { | 71 } else { |
70 url.append("&ext=0"); | 72 url.append("&ext=0"); |
71 } | 73 } |
72 return url; | 74 return url; |
73 } | 75 } |
| 76 |
| 77 } // namespace safe_browsing |
OLD | NEW |