Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Side by Side Diff: chrome/browser/component_updater/chrome_component_updater_configurator.cc

Issue 1823273002: Send the value of google_brand::GetBrand in component update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor unit test improvement. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/updater/chrome_update_client_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
11 #include "base/threading/sequenced_worker_pool.h" 11 #include "base/threading/sequenced_worker_pool.h"
12 #include "base/version.h" 12 #include "base/version.h"
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 #include "base/win/win_util.h" 14 #include "base/win/win_util.h"
15 #endif 15 #endif
16 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr ocess.h" 16 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr ocess.h"
17 #include "chrome/browser/google/google_brand.h"
17 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" 18 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
18 #include "chrome/common/channel_info.h" 19 #include "chrome/common/channel_info.h"
19 #if defined(OS_WIN) 20 #if defined(OS_WIN)
20 #include "chrome/installer/util/google_update_settings.h" 21 #include "chrome/installer/util/google_update_settings.h"
21 #endif 22 #endif
22 #include "components/component_updater/configurator_impl.h" 23 #include "components/component_updater/configurator_impl.h"
23 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
24 25
25 namespace component_updater { 26 namespace component_updater {
26 27
27 namespace { 28 namespace {
28 29
29 class ChromeConfigurator : public update_client::Configurator { 30 class ChromeConfigurator : public update_client::Configurator {
30 public: 31 public:
31 ChromeConfigurator(const base::CommandLine* cmdline, 32 ChromeConfigurator(const base::CommandLine* cmdline,
32 net::URLRequestContextGetter* url_request_getter); 33 net::URLRequestContextGetter* url_request_getter);
33 34
34 // update_client::Configurator overrides. 35 // update_client::Configurator overrides.
35 int InitialDelay() const override; 36 int InitialDelay() const override;
36 int NextCheckDelay() const override; 37 int NextCheckDelay() const override;
37 int StepDelay() const override; 38 int StepDelay() const override;
38 int OnDemandDelay() const override; 39 int OnDemandDelay() const override;
39 int UpdateDelay() const override; 40 int UpdateDelay() const override;
40 std::vector<GURL> UpdateUrl() const override; 41 std::vector<GURL> UpdateUrl() const override;
41 std::vector<GURL> PingUrl() const override; 42 std::vector<GURL> PingUrl() const override;
42 base::Version GetBrowserVersion() const override; 43 base::Version GetBrowserVersion() const override;
43 std::string GetChannel() const override; 44 std::string GetChannel() const override;
45 std::string GetBrand() const override;
44 std::string GetLang() const override; 46 std::string GetLang() const override;
45 std::string GetOSLongName() const override; 47 std::string GetOSLongName() const override;
46 std::string ExtraRequestParams() const override; 48 std::string ExtraRequestParams() const override;
47 std::string GetDownloadPreference() const override; 49 std::string GetDownloadPreference() const override;
48 net::URLRequestContextGetter* RequestContext() const override; 50 net::URLRequestContextGetter* RequestContext() const override;
49 scoped_refptr<update_client::OutOfProcessPatcher> CreateOutOfProcessPatcher() 51 scoped_refptr<update_client::OutOfProcessPatcher> CreateOutOfProcessPatcher()
50 const override; 52 const override;
51 bool DeltasEnabled() const override; 53 bool DeltasEnabled() const override;
52 bool UseBackgroundDownloader() const override; 54 bool UseBackgroundDownloader() const override;
53 bool UseCupSigning() const override; 55 bool UseCupSigning() const override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 98 }
97 99
98 base::Version ChromeConfigurator::GetBrowserVersion() const { 100 base::Version ChromeConfigurator::GetBrowserVersion() const {
99 return configurator_impl_.GetBrowserVersion(); 101 return configurator_impl_.GetBrowserVersion();
100 } 102 }
101 103
102 std::string ChromeConfigurator::GetChannel() const { 104 std::string ChromeConfigurator::GetChannel() const {
103 return chrome::GetChannelString(); 105 return chrome::GetChannelString();
104 } 106 }
105 107
108 std::string ChromeConfigurator::GetBrand() const {
109 std::string brand;
110 google_brand::GetBrand(&brand);
111 return brand;
112 }
113
106 std::string ChromeConfigurator::GetLang() const { 114 std::string ChromeConfigurator::GetLang() const {
107 return ChromeUpdateQueryParamsDelegate::GetLang(); 115 return ChromeUpdateQueryParamsDelegate::GetLang();
108 } 116 }
109 117
110 std::string ChromeConfigurator::GetOSLongName() const { 118 std::string ChromeConfigurator::GetOSLongName() const {
111 return configurator_impl_.GetOSLongName(); 119 return configurator_impl_.GetOSLongName();
112 } 120 }
113 121
114 std::string ChromeConfigurator::ExtraRequestParams() const { 122 std::string ChromeConfigurator::ExtraRequestParams() const {
115 return configurator_impl_.ExtraRequestParams(); 123 return configurator_impl_.ExtraRequestParams();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } // namespace 172 } // namespace
165 173
166 scoped_refptr<update_client::Configurator> 174 scoped_refptr<update_client::Configurator>
167 MakeChromeComponentUpdaterConfigurator( 175 MakeChromeComponentUpdaterConfigurator(
168 const base::CommandLine* cmdline, 176 const base::CommandLine* cmdline,
169 net::URLRequestContextGetter* context_getter) { 177 net::URLRequestContextGetter* context_getter) {
170 return new ChromeConfigurator(cmdline, context_getter); 178 return new ChromeConfigurator(cmdline, context_getter);
171 } 179 }
172 180
173 } // namespace component_updater 181 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/updater/chrome_update_client_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698