OLD | NEW |
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 "net/proxy/proxy_service_v8.h" | 5 #include "net/proxy/proxy_service_v8.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/proxy/multi_threaded_proxy_resolver.h" | 8 #include "net/proxy/multi_threaded_proxy_resolver.h" |
9 #include "net/proxy/network_delegate_error_observer.h" | 9 #include "net/proxy/network_delegate_error_observer.h" |
10 #include "net/proxy/proxy_resolver.h" | 10 #include "net/proxy/proxy_resolver.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 DCHECK(dhcp_proxy_script_fetcher); | 80 DCHECK(dhcp_proxy_script_fetcher); |
81 DCHECK(host_resolver); | 81 DCHECK(host_resolver); |
82 | 82 |
83 if (num_pac_threads == 0) | 83 if (num_pac_threads == 0) |
84 num_pac_threads = ProxyService::kDefaultNumPacThreads; | 84 num_pac_threads = ProxyService::kDefaultNumPacThreads; |
85 | 85 |
86 ProxyResolverFactory* sync_resolver_factory = | 86 ProxyResolverFactory* sync_resolver_factory = |
87 new ProxyResolverFactoryForV8( | 87 new ProxyResolverFactoryForV8( |
88 host_resolver, | 88 host_resolver, |
89 MessageLoop::current(), | 89 MessageLoop::current(), |
90 base::MessageLoopProxy::current(), | 90 base::MessageLoopProxy::current().get(), |
91 net_log, | 91 net_log, |
92 network_delegate); | 92 network_delegate); |
93 | 93 |
94 ProxyResolver* proxy_resolver = | 94 ProxyResolver* proxy_resolver = |
95 new MultiThreadedProxyResolver(sync_resolver_factory, num_pac_threads); | 95 new MultiThreadedProxyResolver(sync_resolver_factory, num_pac_threads); |
96 | 96 |
97 ProxyService* proxy_service = | 97 ProxyService* proxy_service = |
98 new ProxyService(proxy_config_service, proxy_resolver, net_log); | 98 new ProxyService(proxy_config_service, proxy_resolver, net_log); |
99 | 99 |
100 // Configure fetchers to use for PAC script downloads and auto-detect. | 100 // Configure fetchers to use for PAC script downloads and auto-detect. |
101 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, | 101 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, |
102 dhcp_proxy_script_fetcher); | 102 dhcp_proxy_script_fetcher); |
103 | 103 |
104 return proxy_service; | 104 return proxy_service; |
105 } | 105 } |
106 | 106 |
107 } // namespace net | 107 } // namespace net |
OLD | NEW |