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

Side by Side Diff: chrome/browser/component_updater/chrome_component_updater_configurator.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 "chrome/browser/component_updater/chrome_component_updater_configurator .h" 5 #include "chrome/browser/component_updater/chrome_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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (it->substr(0, found) == test) { 102 if (it->substr(0, found) == test) {
103 return it->substr(found + 1); 103 return it->substr(found + 1);
104 } 104 }
105 } 105 }
106 } 106 }
107 return std::string(); 107 return std::string();
108 } 108 }
109 109
110 class ChromeConfigurator : public Configurator { 110 class ChromeConfigurator : public Configurator {
111 public: 111 public:
112 ChromeConfigurator(const CommandLine* cmdline, 112 ChromeConfigurator(const base::CommandLine* cmdline,
113 net::URLRequestContextGetter* url_request_getter); 113 net::URLRequestContextGetter* url_request_getter);
114 114
115 ~ChromeConfigurator() override {} 115 ~ChromeConfigurator() override {}
116 116
117 int InitialDelay() const override; 117 int InitialDelay() const override;
118 int NextCheckDelay() override; 118 int NextCheckDelay() override;
119 int StepDelay() const override; 119 int StepDelay() const override;
120 int StepDelayMedium() override; 120 int StepDelayMedium() override;
121 int MinimumReCheckWait() const override; 121 int MinimumReCheckWait() const override;
122 int OnDemandDelay() const override; 122 int OnDemandDelay() const override;
(...skipping 19 matching lines...) Expand all
142 std::string extra_info_; 142 std::string extra_info_;
143 GURL url_source_override_; 143 GURL url_source_override_;
144 bool fast_update_; 144 bool fast_update_;
145 bool pings_enabled_; 145 bool pings_enabled_;
146 bool deltas_enabled_; 146 bool deltas_enabled_;
147 bool background_downloads_enabled_; 147 bool background_downloads_enabled_;
148 bool fallback_to_alt_source_url_enabled_; 148 bool fallback_to_alt_source_url_enabled_;
149 }; 149 };
150 150
151 ChromeConfigurator::ChromeConfigurator( 151 ChromeConfigurator::ChromeConfigurator(
152 const CommandLine* cmdline, 152 const base::CommandLine* cmdline,
153 net::URLRequestContextGetter* url_request_getter) 153 net::URLRequestContextGetter* url_request_getter)
154 : url_request_getter_(url_request_getter), 154 : url_request_getter_(url_request_getter),
155 fast_update_(false), 155 fast_update_(false),
156 pings_enabled_(false), 156 pings_enabled_(false),
157 deltas_enabled_(false), 157 deltas_enabled_(false),
158 background_downloads_enabled_(false), 158 background_downloads_enabled_(false),
159 fallback_to_alt_source_url_enabled_(false) { 159 fallback_to_alt_source_url_enabled_(false) {
160 // Parse comma-delimited debug flags. 160 // Parse comma-delimited debug flags.
161 std::vector<std::string> switch_values; 161 std::vector<std::string> switch_values;
162 Tokenize(cmdline->GetSwitchValueASCII(switches::kComponentUpdater), 162 Tokenize(cmdline->GetSwitchValueASCII(switches::kComponentUpdater),
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 } // namespace 285 } // namespace
286 286
287 Configurator* MakeChromeComponentUpdaterConfigurator( 287 Configurator* MakeChromeComponentUpdaterConfigurator(
288 const base::CommandLine* cmdline, 288 const base::CommandLine* cmdline,
289 net::URLRequestContextGetter* context_getter) { 289 net::URLRequestContextGetter* context_getter) {
290 return new ChromeConfigurator(cmdline, context_getter); 290 return new ChromeConfigurator(cmdline, context_getter);
291 } 291 }
292 292
293 } // namespace component_updater 293 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698