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

Side by Side Diff: components/component_updater/configurator_impl.cc

Issue 2169323003: Test current behavior of -component-updater=fast-update in ConfiguratorImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
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 "components/component_updater/configurator_impl.h" 5 #include "components/component_updater/configurator_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.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 "components/component_updater/component_updater_switches.h" 16 #include "components/component_updater/component_updater_switches.h"
17 #include "components/component_updater/component_updater_url_constants.h" 17 #include "components/component_updater/component_updater_url_constants.h"
18 #include "components/update_client/utils.h" 18 #include "components/update_client/utils.h"
19 #include "components/version_info/version_info.h" 19 #include "components/version_info/version_info.h"
20 20
21 #if defined(OS_WIN) 21 #if defined(OS_WIN)
22 #include "base/win/win_util.h" 22 #include "base/win/win_util.h"
23 #endif // OS_WIN 23 #endif // OS_WIN
24 24
25 namespace component_updater { 25 namespace component_updater {
26 26
27 namespace { 27 namespace {
28
28 // Default time constants. 29 // Default time constants.
29 const int kDelayOneMinute = 60; 30 const int kDelayOneMinute = 60;
30 const int kDelayOneHour = kDelayOneMinute * 60; 31 const int kDelayOneHour = kDelayOneMinute * 60;
31 32
32 // Debug values you can pass to --component-updater=value1,value2. 33 // Debug values you can pass to --component-updater=value1,value2. Do not
34 // use these values in production code.
35
33 // Speed up component checking. 36 // Speed up component checking.
34 const char kSwitchFastUpdate[] = "fast-update"; 37 const char kSwitchFastUpdate[] = "fast-update";
35 38
36 // Add "testrequest=1" attribute to the update check request. 39 // Add "testrequest=1" attribute to the update check request.
37 const char kSwitchRequestParam[] = "test-request"; 40 const char kSwitchRequestParam[] = "test-request";
38 41
39 // Disables pings. Pings are the requests sent to the update server that report 42 // Disables pings. Pings are the requests sent to the update server that report
40 // the success or the failure of component install or update attempts. 43 // the success or the failure of component install or update attempts.
41 extern const char kSwitchDisablePings[] = "disable-pings"; 44 extern const char kSwitchDisablePings[] = "disable-pings";
42 45
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 186
184 bool ConfiguratorImpl::UseBackgroundDownloader() const { 187 bool ConfiguratorImpl::UseBackgroundDownloader() const {
185 return background_downloads_enabled_; 188 return background_downloads_enabled_;
186 } 189 }
187 190
188 bool ConfiguratorImpl::UseCupSigning() const { 191 bool ConfiguratorImpl::UseCupSigning() const {
189 return true; 192 return true;
190 } 193 }
191 194
192 } // namespace component_updater 195 } // namespace component_updater
OLDNEW
« no previous file with comments | « components/component_updater/BUILD.gn ('k') | components/component_updater/configurator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698