| 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 "net/proxy/proxy_service.h" | 5 #include "net/proxy/proxy_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 DCHECK(dhcp_proxy_script_fetcher); | 421 DCHECK(dhcp_proxy_script_fetcher); |
| 422 DCHECK(host_resolver); | 422 DCHECK(host_resolver); |
| 423 | 423 |
| 424 if (num_pac_threads == 0) | 424 if (num_pac_threads == 0) |
| 425 num_pac_threads = kDefaultNumPacThreads; | 425 num_pac_threads = kDefaultNumPacThreads; |
| 426 | 426 |
| 427 ProxyResolverFactory* sync_resolver_factory = | 427 ProxyResolverFactory* sync_resolver_factory = |
| 428 new ProxyResolverFactoryForV8( | 428 new ProxyResolverFactoryForV8( |
| 429 host_resolver, | 429 host_resolver, |
| 430 MessageLoop::current(), | 430 MessageLoop::current(), |
| 431 base::MessageLoopProxy::CreateForCurrentThread(), | 431 base::MessageLoopProxy::current(), |
| 432 net_log, | 432 net_log, |
| 433 network_delegate); | 433 network_delegate); |
| 434 | 434 |
| 435 ProxyResolver* proxy_resolver = | 435 ProxyResolver* proxy_resolver = |
| 436 new MultiThreadedProxyResolver(sync_resolver_factory, num_pac_threads); | 436 new MultiThreadedProxyResolver(sync_resolver_factory, num_pac_threads); |
| 437 | 437 |
| 438 ProxyService* proxy_service = | 438 ProxyService* proxy_service = |
| 439 new ProxyService(proxy_config_service, proxy_resolver, net_log); | 439 new ProxyService(proxy_config_service, proxy_resolver, net_log); |
| 440 | 440 |
| 441 // Configure fetchers to use for PAC script downloads and auto-detect. | 441 // Configure fetchers to use for PAC script downloads and auto-detect. |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 OnCompletion(result_); | 1021 OnCompletion(result_); |
| 1022 } | 1022 } |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 void SyncProxyServiceHelper::OnCompletion(int rv) { | 1025 void SyncProxyServiceHelper::OnCompletion(int rv) { |
| 1026 result_ = rv; | 1026 result_ = rv; |
| 1027 event_.Signal(); | 1027 event_.Signal(); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 } // namespace net | 1030 } // namespace net |
| OLD | NEW |