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

Side by Side Diff: chrome/browser/net/connection_tester.cc

Issue 816403003: 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
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/cookie_store_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return net::OK; 178 return net::OK;
179 } 179 }
180 180
181 // Creates a proxy service for |experiment|. On success returns net::OK 181 // Creates a proxy service for |experiment|. On success returns net::OK
182 // and fills |experiment_proxy_service| with a new pointer. Otherwise returns 182 // and fills |experiment_proxy_service| with a new pointer. Otherwise returns
183 // a network error code. 183 // a network error code.
184 int CreateProxyService( 184 int CreateProxyService(
185 ConnectionTester::ProxySettingsExperiment experiment, 185 ConnectionTester::ProxySettingsExperiment experiment,
186 scoped_ptr<net::ProxyConfigService>* proxy_config_service, 186 scoped_ptr<net::ProxyConfigService>* proxy_config_service,
187 scoped_ptr<net::ProxyService>* experiment_proxy_service) { 187 scoped_ptr<net::ProxyService>* experiment_proxy_service) {
188 if (CommandLine::ForCurrentProcess()->HasSwitch( 188 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
189 switches::kSingleProcess)) { 189 switches::kSingleProcess)) {
190 // We can't create a standard proxy resolver in single-process mode. 190 // We can't create a standard proxy resolver in single-process mode.
191 // Rather than falling-back to some other implementation, fail. 191 // Rather than falling-back to some other implementation, fail.
192 return net::ERR_NOT_IMPLEMENTED; 192 return net::ERR_NOT_IMPLEMENTED;
193 } 193 }
194 194
195 net::DhcpProxyScriptFetcherFactory dhcp_factory; 195 net::DhcpProxyScriptFetcherFactory dhcp_factory;
196 196
197 #if defined(OS_IOS) 197 #if defined(OS_IOS)
198 experiment_proxy_service->reset( 198 experiment_proxy_service->reset(
199 net::ProxyService::CreateUsingSystemProxyResolver( 199 net::ProxyService::CreateUsingSystemProxyResolver(
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 533
534 // Notify the delegate of completion. 534 // Notify the delegate of completion.
535 delegate_->OnCompletedConnectionTestExperiment(current, result); 535 delegate_->OnCompletedConnectionTestExperiment(current, result);
536 536
537 if (remaining_experiments_.empty()) { 537 if (remaining_experiments_.empty()) {
538 delegate_->OnCompletedConnectionTestSuite(); 538 delegate_->OnCompletedConnectionTestSuite();
539 } else { 539 } else {
540 StartNextExperiment(); 540 StartNextExperiment();
541 } 541 }
542 } 542 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/cookie_store_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698