OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_mojo.h" | 5 #include "net/proxy/proxy_service_mojo.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "net/dns/mojo_host_resolver_impl.h" | 13 #include "net/dns/mojo_host_resolver_impl.h" |
14 #include "net/interfaces/proxy_resolver_service.mojom.h" | 14 #include "net/interfaces/proxy_resolver_service.mojom.h" |
15 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h" | |
16 #include "net/proxy/mojo_proxy_resolver_factory.h" | 15 #include "net/proxy/mojo_proxy_resolver_factory.h" |
17 #include "net/proxy/mojo_proxy_resolver_impl.h" | |
18 #include "net/proxy/network_delegate_error_observer.h" | 16 #include "net/proxy/network_delegate_error_observer.h" |
19 #include "net/proxy/proxy_resolver_factory.h" | 17 #include "net/proxy/proxy_resolver_factory.h" |
20 #include "net/proxy/proxy_resolver_factory_mojo.h" | 18 #include "net/proxy/proxy_resolver_factory_mojo.h" |
21 #include "net/proxy/proxy_resolver_v8_tracing.h" | 19 #include "net/proxy/proxy_resolver_v8_tracing.h" |
22 #include "net/proxy/proxy_service.h" | 20 #include "net/proxy/proxy_service.h" |
23 | 21 |
24 namespace net { | 22 namespace net { |
25 | 23 |
26 std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoFactory( | 24 std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoFactory( |
27 MojoProxyResolverFactory* mojo_proxy_factory, | 25 MojoProxyResolverFactory* mojo_proxy_factory, |
(...skipping 17 matching lines...) Expand all Loading... |
45 net_log), | 43 net_log), |
46 net_log)); | 44 net_log)); |
47 | 45 |
48 // Configure fetchers to use for PAC script downloads and auto-detect. | 46 // Configure fetchers to use for PAC script downloads and auto-detect. |
49 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, | 47 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, |
50 std::move(dhcp_proxy_script_fetcher)); | 48 std::move(dhcp_proxy_script_fetcher)); |
51 | 49 |
52 return proxy_service; | 50 return proxy_service; |
53 } | 51 } |
54 | 52 |
55 std::unique_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess( | |
56 std::unique_ptr<ProxyConfigService> proxy_config_service, | |
57 ProxyScriptFetcher* proxy_script_fetcher, | |
58 std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher, | |
59 HostResolver* host_resolver, | |
60 NetLog* net_log, | |
61 NetworkDelegate* network_delegate) { | |
62 return CreateProxyServiceUsingMojoFactory( | |
63 InProcessMojoProxyResolverFactory::GetInstance(), | |
64 std::move(proxy_config_service), proxy_script_fetcher, | |
65 std::move(dhcp_proxy_script_fetcher), host_resolver, net_log, | |
66 network_delegate); | |
67 } | |
68 | |
69 } // namespace net | 53 } // namespace net |
OLD | NEW |