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 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 if (HasSwitchValue(switch_values, kSwitchRequestParam)) | 153 if (HasSwitchValue(switch_values, kSwitchRequestParam)) |
154 extra_info_ += "testrequest=\"1\""; | 154 extra_info_ += "testrequest=\"1\""; |
155 } | 155 } |
156 | 156 |
157 int ChromeConfigurator::InitialDelay() { | 157 int ChromeConfigurator::InitialDelay() { |
158 return fast_update_ ? 1 : (6 * kDelayOneMinute); | 158 return fast_update_ ? 1 : (6 * kDelayOneMinute); |
159 } | 159 } |
160 | 160 |
161 int ChromeConfigurator::NextCheckDelay() { | 161 int ChromeConfigurator::NextCheckDelay() { |
162 return fast_update_ ? 3 : (2 * kDelayOneHour); | 162 return fast_update_ ? 3 : (6 * kDelayOneHour); |
163 } | 163 } |
164 | 164 |
165 int ChromeConfigurator::StepDelayMedium() { | 165 int ChromeConfigurator::StepDelayMedium() { |
166 return fast_update_ ? 3 : (15 * kDelayOneMinute); | 166 return fast_update_ ? 3 : (15 * kDelayOneMinute); |
167 } | 167 } |
168 | 168 |
169 int ChromeConfigurator::StepDelay() { | 169 int ChromeConfigurator::StepDelay() { |
170 return fast_update_ ? 1 : 1; | 170 return fast_update_ ? 1 : 1; |
171 } | 171 } |
172 | 172 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 bool ChromeConfigurator::UseBackgroundDownloader() const { | 217 bool ChromeConfigurator::UseBackgroundDownloader() const { |
218 return background_downloads_enabled_; | 218 return background_downloads_enabled_; |
219 } | 219 } |
220 | 220 |
221 ComponentUpdateService::Configurator* MakeChromeComponentUpdaterConfigurator( | 221 ComponentUpdateService::Configurator* MakeChromeComponentUpdaterConfigurator( |
222 const CommandLine* cmdline, net::URLRequestContextGetter* context_getter) { | 222 const CommandLine* cmdline, net::URLRequestContextGetter* context_getter) { |
223 return new ChromeConfigurator(cmdline, context_getter); | 223 return new ChromeConfigurator(cmdline, context_getter); |
224 } | 224 } |
225 | 225 |
226 } // namespace component_updater | 226 } // namespace component_updater |
OLD | NEW |