OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 return rv; // Failure. | 144 return rv; // Failure. |
145 | 145 |
146 if (CommandLine::ForCurrentProcess()->HasSwitch( | 146 if (CommandLine::ForCurrentProcess()->HasSwitch( |
147 switches::kSingleProcess)) { | 147 switches::kSingleProcess)) { |
148 // We can't create a standard proxy resolver in single-process mode. | 148 // We can't create a standard proxy resolver in single-process mode. |
149 // Rather than falling-back to some other implementation, fail. | 149 // Rather than falling-back to some other implementation, fail. |
150 return net::ERR_NOT_IMPLEMENTED; | 150 return net::ERR_NOT_IMPLEMENTED; |
151 } | 151 } |
152 | 152 |
153 *proxy_service = net::ProxyService::Create(config_service.release(), true, | 153 *proxy_service = net::ProxyService::Create(config_service.release(), true, |
154 this, NULL, MessageLoop::current()); | 154 0u, this, NULL, MessageLoop::current()); |
155 | 155 |
156 return net::OK; | 156 return net::OK; |
157 } | 157 } |
158 | 158 |
159 // Creates a proxy config service that pulls from the system proxy settings. | 159 // Creates a proxy config service that pulls from the system proxy settings. |
160 // On success returns net::OK and fills |config_service| with a new pointer. | 160 // On success returns net::OK and fills |config_service| with a new pointer. |
161 // Otherwise returns a network error code. | 161 // Otherwise returns a network error code. |
162 int CreateSystemProxyConfigService( | 162 int CreateSystemProxyConfigService( |
163 scoped_ptr<net::ProxyConfigService>* config_service) { | 163 scoped_ptr<net::ProxyConfigService>* config_service) { |
164 #if defined(OS_LINUX) | 164 #if defined(OS_LINUX) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 389 |
390 // Notify the delegate of completion. | 390 // Notify the delegate of completion. |
391 delegate_->OnCompletedConnectionTestExperiment(current, result); | 391 delegate_->OnCompletedConnectionTestExperiment(current, result); |
392 | 392 |
393 if (remaining_experiments_.empty()) { | 393 if (remaining_experiments_.empty()) { |
394 delegate_->OnCompletedConnectionTestSuite(); | 394 delegate_->OnCompletedConnectionTestSuite(); |
395 } else { | 395 } else { |
396 StartNextExperiment(); | 396 StartNextExperiment(); |
397 } | 397 } |
398 } | 398 } |
OLD | NEW |