| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/update_client/update_query_params.h" | 5 #include "components/update_client/update_query_params.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "components/update_client/update_query_params_delegate.h" | 10 #include "components/update_client/update_query_params_delegate.h" |
| 11 #include "components/version_info/version_info.h" |
| 11 | 12 |
| 12 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 13 #include "base/win/windows_version.h" | 14 #include "base/win/windows_version.h" |
| 14 #endif | 15 #endif |
| 15 | 16 |
| 16 namespace update_client { | 17 namespace update_client { |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| 20 const char kUnknown[] = "unknown"; | 21 const char kUnknown[] = "unknown"; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 #elif defined(ARCH_CPU_MIPS64EL) | 124 #elif defined(ARCH_CPU_MIPS64EL) |
| 124 return "mips64"; | 125 return "mips64"; |
| 125 #else | 126 #else |
| 126 // NOTE: when adding new values here, please remember to update the | 127 // NOTE: when adding new values here, please remember to update the |
| 127 // comment in the .h file about possible return values from this function. | 128 // comment in the .h file about possible return values from this function. |
| 128 #error "You need to add support for your architecture here" | 129 #error "You need to add support for your architecture here" |
| 129 #endif | 130 #endif |
| 130 } | 131 } |
| 131 | 132 |
| 132 // static | 133 // static |
| 134 std::string UpdateQueryParams::GetProdVersion() { |
| 135 return version_info::GetVersionNumber(); |
| 136 } |
| 137 |
| 138 // static |
| 133 void UpdateQueryParams::SetDelegate(UpdateQueryParamsDelegate* delegate) { | 139 void UpdateQueryParams::SetDelegate(UpdateQueryParamsDelegate* delegate) { |
| 134 DCHECK(!g_delegate || !delegate || (delegate == g_delegate)); | 140 DCHECK(!g_delegate || !delegate || (delegate == g_delegate)); |
| 135 g_delegate = delegate; | 141 g_delegate = delegate; |
| 136 } | 142 } |
| 137 | 143 |
| 138 } // namespace update_client | 144 } // namespace update_client |
| OLD | NEW |