OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 NULL)); | 204 NULL)); |
205 | 205 |
206 return net::OK; | 206 return net::OK; |
207 } | 207 } |
208 | 208 |
209 // Creates a proxy config service that pulls from the system proxy settings. | 209 // Creates a proxy config service that pulls from the system proxy settings. |
210 // On success returns net::OK and fills |config_service| with a new pointer. | 210 // On success returns net::OK and fills |config_service| with a new pointer. |
211 // Otherwise returns a network error code. | 211 // Otherwise returns a network error code. |
212 int CreateSystemProxyConfigService( | 212 int CreateSystemProxyConfigService( |
213 scoped_ptr<net::ProxyConfigService>* config_service) { | 213 scoped_ptr<net::ProxyConfigService>* config_service) { |
214 #if defined(OS_LINUX) | 214 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
215 // TODO(eroman): This is not supported on Linux yet, because of how | 215 // TODO(eroman): This is not supported on Linux yet, because of how |
216 // construction needs ot happen on the UI thread. | 216 // construction needs ot happen on the UI thread. |
217 return net::ERR_NOT_IMPLEMENTED; | 217 return net::ERR_NOT_IMPLEMENTED; |
218 #else | 218 #else |
219 config_service->reset( | 219 config_service->reset( |
220 net::ProxyService::CreateSystemProxyConfigService( | 220 net::ProxyService::CreateSystemProxyConfigService( |
221 MessageLoop::current(), NULL)); | 221 MessageLoop::current(), NULL)); |
222 return net::OK; | 222 return net::OK; |
223 #endif | 223 #endif |
224 } | 224 } |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 463 |
464 // Notify the delegate of completion. | 464 // Notify the delegate of completion. |
465 delegate_->OnCompletedConnectionTestExperiment(current, result); | 465 delegate_->OnCompletedConnectionTestExperiment(current, result); |
466 | 466 |
467 if (remaining_experiments_.empty()) { | 467 if (remaining_experiments_.empty()) { |
468 delegate_->OnCompletedConnectionTestSuite(); | 468 delegate_->OnCompletedConnectionTestSuite(); |
469 } else { | 469 } else { |
470 StartNextExperiment(); | 470 StartNextExperiment(); |
471 } | 471 } |
472 } | 472 } |
OLD | NEW |