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 "chrome/browser/component_updater/chrome_component_updater_configurator
.h" | 5 #include "chrome/browser/component_updater/chrome_component_updater_configurator
.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/version.h" | 15 #include "base/version.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr
ocess.h" | 17 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr
ocess.h" |
18 #include "chrome/browser/component_updater/component_updater_url_constants.h" | 18 #include "chrome/browser/component_updater/component_updater_url_constants.h" |
19 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" | 19 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" |
20 #include "chrome/common/chrome_version_info.h" | |
21 #include "components/component_updater/component_updater_switches.h" | 20 #include "components/component_updater/component_updater_switches.h" |
22 #include "components/update_client/configurator.h" | 21 #include "components/update_client/configurator.h" |
| 22 #include "components/version_info/version_info.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 #include "net/url_request/url_request_context_getter.h" | 24 #include "net/url_request/url_request_context_getter.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
28 #include "base/win/win_util.h" | 28 #include "base/win/win_util.h" |
29 #endif // OS_WIN | 29 #endif // OS_WIN |
30 | 30 |
31 using update_client::Configurator; | 31 using update_client::Configurator; |
32 using update_client::OutOfProcessPatcher; | 32 using update_client::OutOfProcessPatcher; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 } | 212 } |
213 return urls; | 213 return urls; |
214 } | 214 } |
215 | 215 |
216 std::vector<GURL> ChromeConfigurator::PingUrl() const { | 216 std::vector<GURL> ChromeConfigurator::PingUrl() const { |
217 return pings_enabled_ ? UpdateUrl() : std::vector<GURL>(); | 217 return pings_enabled_ ? UpdateUrl() : std::vector<GURL>(); |
218 } | 218 } |
219 | 219 |
220 base::Version ChromeConfigurator::GetBrowserVersion() const { | 220 base::Version ChromeConfigurator::GetBrowserVersion() const { |
221 return base::Version(chrome::VersionInfo().Version()); | 221 return base::Version(version_info::GetVersionNumber()); |
222 } | 222 } |
223 | 223 |
224 std::string ChromeConfigurator::GetChannel() const { | 224 std::string ChromeConfigurator::GetChannel() const { |
225 return ChromeUpdateQueryParamsDelegate::GetChannelString(); | 225 return ChromeUpdateQueryParamsDelegate::GetChannelString(); |
226 } | 226 } |
227 | 227 |
228 std::string ChromeConfigurator::GetLang() const { | 228 std::string ChromeConfigurator::GetLang() const { |
229 return ChromeUpdateQueryParamsDelegate::GetLang(); | 229 return ChromeUpdateQueryParamsDelegate::GetLang(); |
230 } | 230 } |
231 | 231 |
232 std::string ChromeConfigurator::GetOSLongName() const { | 232 std::string ChromeConfigurator::GetOSLongName() const { |
233 return chrome::VersionInfo().OSType(); | 233 return version_info::GetOSType(); |
234 } | 234 } |
235 | 235 |
236 std::string ChromeConfigurator::ExtraRequestParams() const { | 236 std::string ChromeConfigurator::ExtraRequestParams() const { |
237 return extra_info_; | 237 return extra_info_; |
238 } | 238 } |
239 | 239 |
240 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { | 240 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { |
241 return url_request_getter_; | 241 return url_request_getter_; |
242 } | 242 } |
243 | 243 |
(...skipping 27 matching lines...) Expand all Loading... |
271 } // namespace | 271 } // namespace |
272 | 272 |
273 scoped_refptr<update_client::Configurator> | 273 scoped_refptr<update_client::Configurator> |
274 MakeChromeComponentUpdaterConfigurator( | 274 MakeChromeComponentUpdaterConfigurator( |
275 const base::CommandLine* cmdline, | 275 const base::CommandLine* cmdline, |
276 net::URLRequestContextGetter* context_getter) { | 276 net::URLRequestContextGetter* context_getter) { |
277 return new ChromeConfigurator(cmdline, context_getter); | 277 return new ChromeConfigurator(cmdline, context_getter); |
278 } | 278 } |
279 | 279 |
280 } // namespace component_updater | 280 } // namespace component_updater |
OLD | NEW |