| 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 "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "components/component_updater/browser/component_updater_switches.h" |
| 16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
| 17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 namespace component_updater { | 19 namespace component_updater { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Default time constants. | 23 // Default time constants. |
| 24 const int kDelayOneMinute = 60; | 24 const int kDelayOneMinute = 60; |
| 25 const int kDelayOneHour = kDelayOneMinute * 60; | 25 const int kDelayOneHour = kDelayOneMinute * 60; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 bool ChromeConfigurator::DeltasEnabled() const { | 202 bool ChromeConfigurator::DeltasEnabled() const { |
| 203 return deltas_enabled_; | 203 return deltas_enabled_; |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool ChromeConfigurator::UseBackgroundDownloader() const { | 206 bool ChromeConfigurator::UseBackgroundDownloader() const { |
| 207 return background_downloads_enabled_; | 207 return background_downloads_enabled_; |
| 208 } | 208 } |
| 209 | 209 |
| 210 Configurator* MakeChromeComponentUpdaterConfigurator( | 210 Configurator* MakeChromeComponentUpdaterConfigurator( |
| 211 const CommandLine* cmdline, | 211 const base::CommandLine* cmdline, |
| 212 net::URLRequestContextGetter* context_getter) { | 212 net::URLRequestContextGetter* context_getter) { |
| 213 return new ChromeConfigurator(cmdline, context_getter); | 213 return new ChromeConfigurator(cmdline, context_getter); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace component_updater | 216 } // namespace component_updater |
| OLD | NEW |