| 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 { | 19 namespace safe_browsing { |
| 20 | 20 |
| 21 SafeBrowsingProtocolConfig::SafeBrowsingProtocolConfig() | 21 SafeBrowsingProtocolConfig::SafeBrowsingProtocolConfig() |
| 22 : disable_auto_update(false) {} | 22 : disable_auto_update(false) {} |
| 23 | 23 |
| 24 SafeBrowsingProtocolConfig::SafeBrowsingProtocolConfig( |
| 25 const SafeBrowsingProtocolConfig& other) = default; |
| 26 |
| 24 SafeBrowsingProtocolConfig::~SafeBrowsingProtocolConfig() {} | 27 SafeBrowsingProtocolConfig::~SafeBrowsingProtocolConfig() {} |
| 25 | 28 |
| 26 // static | 29 // static |
| 27 std::string SafeBrowsingProtocolManagerHelper::Version() { | 30 std::string SafeBrowsingProtocolManagerHelper::Version() { |
| 28 if (version_info::GetVersionNumber().empty()) | 31 if (version_info::GetVersionNumber().empty()) |
| 29 return "0.1"; | 32 return "0.1"; |
| 30 else | 33 else |
| 31 return version_info::GetVersionNumber(); | 34 return version_info::GetVersionNumber(); |
| 32 } | 35 } |
| 33 | 36 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ComposeUrl(prefix, method, client_name, version, additional_query); | 71 ComposeUrl(prefix, method, client_name, version, additional_query); |
| 69 if (is_extended_reporting) { | 72 if (is_extended_reporting) { |
| 70 url.append("&ext=1"); | 73 url.append("&ext=1"); |
| 71 } else { | 74 } else { |
| 72 url.append("&ext=0"); | 75 url.append("&ext=0"); |
| 73 } | 76 } |
| 74 return url; | 77 return url; |
| 75 } | 78 } |
| 76 | 79 |
| 77 } // namespace safe_browsing | 80 } // namespace safe_browsing |
| OLD | NEW |