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

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

Issue 1442123002: Fix compile-time error: unused variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | 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 "components/component_updater/configurator_impl.h" 5 #include "components/component_updater/configurator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 27 matching lines...) Expand all
38 // Disables pings. Pings are the requests sent to the update server that report 38 // Disables pings. Pings are the requests sent to the update server that report
39 // the success or the failure of component install or update attempts. 39 // the success or the failure of component install or update attempts.
40 extern const char kSwitchDisablePings[] = "disable-pings"; 40 extern const char kSwitchDisablePings[] = "disable-pings";
41 41
42 // Sets the URL for updates. 42 // Sets the URL for updates.
43 const char kSwitchUrlSource[] = "url-source"; 43 const char kSwitchUrlSource[] = "url-source";
44 44
45 // Disables differential updates. 45 // Disables differential updates.
46 const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates"; 46 const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates";
47 47
48 #if defined(OS_WIN)
49 // Disables background downloads.
50 const char kSwitchDisableBackgroundDownloads[] = "disable-background-downloads";
51 #endif // defined(OS_WIN)
52
53 // Returns true if and only if |test| is contained in |vec|. 48 // Returns true if and only if |test| is contained in |vec|.
54 bool HasSwitchValue(const std::vector<std::string>& vec, const char* test) { 49 bool HasSwitchValue(const std::vector<std::string>& vec, const char* test) {
55 if (vec.empty()) 50 if (vec.empty())
56 return 0; 51 return 0;
57 return (std::find(vec.begin(), vec.end(), test) != vec.end()); 52 return (std::find(vec.begin(), vec.end(), test) != vec.end());
58 } 53 }
59 54
60 // Returns true if falling back on an alternate, unsafe, service URL is 55 // Returns true if falling back on an alternate, unsafe, service URL is
61 // allowed. In the fallback case, the security of the component update relies 56 // allowed. In the fallback case, the security of the component update relies
62 // only on the integrity of the CRX payloads, which is self-validating. 57 // only on the integrity of the CRX payloads, which is self-validating.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 182
188 bool ConfiguratorImpl::UseBackgroundDownloader() const { 183 bool ConfiguratorImpl::UseBackgroundDownloader() const {
189 return background_downloads_enabled_; 184 return background_downloads_enabled_;
190 } 185 }
191 186
192 void ConfiguratorImpl::set_enable_alt_source_url(bool enable_alt_source_url) { 187 void ConfiguratorImpl::set_enable_alt_source_url(bool enable_alt_source_url) {
193 fallback_to_alt_source_url_enabled_ = enable_alt_source_url; 188 fallback_to_alt_source_url_enabled_ = enable_alt_source_url;
194 } 189 }
195 190
196 } // namespace component_updater 191 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698