| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 if (CommandLine::ForCurrentProcess()->HasSwitch( | 181 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 182 switches::kSingleProcess)) { | 182 switches::kSingleProcess)) { |
| 183 // We can't create a standard proxy resolver in single-process mode. | 183 // We can't create a standard proxy resolver in single-process mode. |
| 184 // Rather than falling-back to some other implementation, fail. | 184 // Rather than falling-back to some other implementation, fail. |
| 185 return net::ERR_NOT_IMPLEMENTED; | 185 return net::ERR_NOT_IMPLEMENTED; |
| 186 } | 186 } |
| 187 | 187 |
| 188 net::DhcpProxyScriptFetcherFactory dhcp_factory; | 188 net::DhcpProxyScriptFetcherFactory dhcp_factory; |
| 189 if (CommandLine::ForCurrentProcess()->HasSwitch( | 189 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 190 switches::kEnableDhcpWpad)) { | 190 switches::kDisableDhcpWpad)) { |
| 191 dhcp_factory.set_enabled(true); | 191 dhcp_factory.set_enabled(false); |
| 192 } | 192 } |
| 193 | 193 |
| 194 proxy_service->reset(net::ProxyService::CreateUsingV8ProxyResolver( | 194 proxy_service->reset(net::ProxyService::CreateUsingV8ProxyResolver( |
| 195 config_service.release(), | 195 config_service.release(), |
| 196 0u, | 196 0u, |
| 197 new net::ProxyScriptFetcherImpl(proxy_request_context_), | 197 new net::ProxyScriptFetcherImpl(proxy_request_context_), |
| 198 dhcp_factory.Create(proxy_request_context_), | 198 dhcp_factory.Create(proxy_request_context_), |
| 199 host_resolver(), | 199 host_resolver(), |
| 200 NULL, | 200 NULL, |
| 201 NULL)); | 201 NULL)); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 460 |
| 461 // Notify the delegate of completion. | 461 // Notify the delegate of completion. |
| 462 delegate_->OnCompletedConnectionTestExperiment(current, result); | 462 delegate_->OnCompletedConnectionTestExperiment(current, result); |
| 463 | 463 |
| 464 if (remaining_experiments_.empty()) { | 464 if (remaining_experiments_.empty()) { |
| 465 delegate_->OnCompletedConnectionTestSuite(); | 465 delegate_->OnCompletedConnectionTestSuite(); |
| 466 } else { | 466 } else { |
| 467 StartNextExperiment(); | 467 StartNextExperiment(); |
| 468 } | 468 } |
| 469 } | 469 } |
| OLD | NEW |