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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 HostResolver* host_resolver, | 27 HostResolver* host_resolver, |
28 NetLog* net_log, | 28 NetLog* net_log, |
29 NetworkDelegate* network_delegate) { | 29 NetworkDelegate* network_delegate) { |
30 DCHECK(proxy_config_service); | 30 DCHECK(proxy_config_service); |
31 DCHECK(proxy_script_fetcher); | 31 DCHECK(proxy_script_fetcher); |
32 DCHECK(dhcp_proxy_script_fetcher); | 32 DCHECK(dhcp_proxy_script_fetcher); |
33 DCHECK(host_resolver); | 33 DCHECK(host_resolver); |
34 | 34 |
35 std::unique_ptr<ProxyService> proxy_service(new ProxyService( | 35 std::unique_ptr<ProxyService> proxy_service(new ProxyService( |
36 std::move(proxy_config_service), | 36 std::move(proxy_config_service), |
37 base::WrapUnique(new ProxyResolverFactoryV8TracingWrapper( | 37 base::MakeUnique<ProxyResolverFactoryV8TracingWrapper>( |
38 host_resolver, net_log, | 38 host_resolver, net_log, |
39 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate, | 39 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate, |
40 base::ThreadTaskRunnerHandle::Get()))), | 40 base::ThreadTaskRunnerHandle::Get())), |
41 net_log)); | 41 net_log)); |
42 | 42 |
43 // Configure fetchers to use for PAC script downloads and auto-detect. | 43 // Configure fetchers to use for PAC script downloads and auto-detect. |
44 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, | 44 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, |
45 std::move(dhcp_proxy_script_fetcher)); | 45 std::move(dhcp_proxy_script_fetcher)); |
46 | 46 |
47 return proxy_service; | 47 return proxy_service; |
48 } | 48 } |
49 | 49 |
50 } // namespace net | 50 } // namespace net |
OLD | NEW |