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/component_updater/component_updater_configurator.h" | 5 #include "chrome/browser/component_updater/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_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/version.h" | 14 #include "base/version.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr
ocess.h" |
16 #include "chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h
" | 17 #include "chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h
" |
17 #include "chrome/common/chrome_version_info.h" | 18 #include "chrome/common/chrome_version_info.h" |
18 #include "components/component_updater/component_updater_switches.h" | 19 #include "components/component_updater/component_updater_switches.h" |
19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
20 #include "net/url_request/url_request_context_getter.h" | 21 #include "net/url_request/url_request_context_getter.h" |
21 #include "url/gurl.h" | 22 #include "url/gurl.h" |
22 | 23 |
23 namespace component_updater { | 24 namespace component_updater { |
24 | 25 |
25 namespace { | 26 namespace { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 virtual int OnDemandDelay() const OVERRIDE; | 106 virtual int OnDemandDelay() const OVERRIDE; |
106 virtual GURL UpdateUrl() const OVERRIDE; | 107 virtual GURL UpdateUrl() const OVERRIDE; |
107 virtual GURL PingUrl() const OVERRIDE; | 108 virtual GURL PingUrl() const OVERRIDE; |
108 virtual base::Version GetBrowserVersion() const OVERRIDE; | 109 virtual base::Version GetBrowserVersion() const OVERRIDE; |
109 virtual std::string GetChannel() const OVERRIDE; | 110 virtual std::string GetChannel() const OVERRIDE; |
110 virtual std::string GetLang() const OVERRIDE; | 111 virtual std::string GetLang() const OVERRIDE; |
111 virtual std::string GetOSLongName() const OVERRIDE; | 112 virtual std::string GetOSLongName() const OVERRIDE; |
112 virtual std::string ExtraRequestParams() const OVERRIDE; | 113 virtual std::string ExtraRequestParams() const OVERRIDE; |
113 virtual size_t UrlSizeLimit() const OVERRIDE; | 114 virtual size_t UrlSizeLimit() const OVERRIDE; |
114 virtual net::URLRequestContextGetter* RequestContext() const OVERRIDE; | 115 virtual net::URLRequestContextGetter* RequestContext() const OVERRIDE; |
115 virtual bool InProcess() const OVERRIDE; | 116 virtual scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() |
| 117 const OVERRIDE; |
116 virtual bool DeltasEnabled() const OVERRIDE; | 118 virtual bool DeltasEnabled() const OVERRIDE; |
117 virtual bool UseBackgroundDownloader() const OVERRIDE; | 119 virtual bool UseBackgroundDownloader() const OVERRIDE; |
118 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 120 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
119 const OVERRIDE; | 121 const OVERRIDE; |
120 virtual scoped_refptr<base::SingleThreadTaskRunner> | 122 virtual scoped_refptr<base::SingleThreadTaskRunner> |
121 GetSingleThreadTaskRunner() const OVERRIDE; | 123 GetSingleThreadTaskRunner() const OVERRIDE; |
122 | 124 |
123 private: | 125 private: |
124 net::URLRequestContextGetter* url_request_getter_; | 126 net::URLRequestContextGetter* url_request_getter_; |
125 std::string extra_info_; | 127 std::string extra_info_; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 218 } |
217 | 219 |
218 size_t ChromeConfigurator::UrlSizeLimit() const { | 220 size_t ChromeConfigurator::UrlSizeLimit() const { |
219 return 1024ul; | 221 return 1024ul; |
220 } | 222 } |
221 | 223 |
222 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { | 224 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { |
223 return url_request_getter_; | 225 return url_request_getter_; |
224 } | 226 } |
225 | 227 |
226 bool ChromeConfigurator::InProcess() const { | 228 scoped_refptr<OutOfProcessPatcher> |
227 return false; | 229 ChromeConfigurator::CreateOutOfProcessPatcher() const { |
| 230 return make_scoped_refptr(new ChromeOutOfProcessPatcher); |
228 } | 231 } |
229 | 232 |
230 bool ChromeConfigurator::DeltasEnabled() const { | 233 bool ChromeConfigurator::DeltasEnabled() const { |
231 return deltas_enabled_; | 234 return deltas_enabled_; |
232 } | 235 } |
233 | 236 |
234 bool ChromeConfigurator::UseBackgroundDownloader() const { | 237 bool ChromeConfigurator::UseBackgroundDownloader() const { |
235 return background_downloads_enabled_; | 238 return background_downloads_enabled_; |
236 } | 239 } |
237 | 240 |
(...skipping 11 matching lines...) Expand all Loading... |
249 content::BrowserThread::FILE); | 252 content::BrowserThread::FILE); |
250 } | 253 } |
251 | 254 |
252 Configurator* MakeChromeComponentUpdaterConfigurator( | 255 Configurator* MakeChromeComponentUpdaterConfigurator( |
253 const base::CommandLine* cmdline, | 256 const base::CommandLine* cmdline, |
254 net::URLRequestContextGetter* context_getter) { | 257 net::URLRequestContextGetter* context_getter) { |
255 return new ChromeConfigurator(cmdline, context_getter); | 258 return new ChromeConfigurator(cmdline, context_getter); |
256 } | 259 } |
257 | 260 |
258 } // namespace component_updater | 261 } // namespace component_updater |
OLD | NEW |