Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: net/proxy/proxy_service_mojo.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "net/dns/mojo_host_resolver_impl.h" 9 #include "net/dns/mojo_host_resolver_impl.h"
10 #include "net/interfaces/proxy_resolver_service.mojom.h" 10 #include "net/interfaces/proxy_resolver_service.mojom.h"
11 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h" 11 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h"
12 #include "net/proxy/mojo_proxy_resolver_factory.h" 12 #include "net/proxy/mojo_proxy_resolver_factory.h"
13 #include "net/proxy/mojo_proxy_resolver_impl.h" 13 #include "net/proxy/mojo_proxy_resolver_impl.h"
14 #include "net/proxy/network_delegate_error_observer.h" 14 #include "net/proxy/network_delegate_error_observer.h"
15 #include "net/proxy/proxy_resolver_factory.h" 15 #include "net/proxy/proxy_resolver_factory.h"
16 #include "net/proxy/proxy_resolver_mojo.h" 16 #include "net/proxy/proxy_resolver_mojo.h"
17 #include "net/proxy/proxy_resolver_v8_tracing.h" 17 #include "net/proxy/proxy_resolver_v8_tracing.h"
18 #include "net/proxy/proxy_service.h" 18 #include "net/proxy/proxy_service.h"
(...skipping 11 matching lines...) Expand all
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 ProxyService* proxy_service = new ProxyService( 35 ProxyService* proxy_service = new ProxyService(
36 proxy_config_service, 36 proxy_config_service,
37 make_scoped_ptr(new ProxyResolverFactoryMojo( 37 make_scoped_ptr(new ProxyResolverFactoryMojo(
38 mojo_proxy_factory, host_resolver, 38 mojo_proxy_factory, host_resolver,
39 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate, 39 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
40 base::MessageLoopProxy::current()))), 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 dhcp_proxy_script_fetcher); 45 dhcp_proxy_script_fetcher);
46 46
47 return proxy_service; 47 return proxy_service;
48 } 48 }
49 49
50 ProxyService* CreateProxyServiceUsingMojoInProcess( 50 ProxyService* CreateProxyServiceUsingMojoInProcess(
51 ProxyConfigService* proxy_config_service, 51 ProxyConfigService* proxy_config_service,
52 ProxyScriptFetcher* proxy_script_fetcher, 52 ProxyScriptFetcher* proxy_script_fetcher,
53 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, 53 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
54 HostResolver* host_resolver, 54 HostResolver* host_resolver,
55 NetLog* net_log, 55 NetLog* net_log,
56 NetworkDelegate* network_delegate) { 56 NetworkDelegate* network_delegate) {
57 return CreateProxyServiceUsingMojoFactory( 57 return CreateProxyServiceUsingMojoFactory(
58 InProcessMojoProxyResolverFactory::GetInstance(), proxy_config_service, 58 InProcessMojoProxyResolverFactory::GetInstance(), proxy_config_service,
59 proxy_script_fetcher, dhcp_proxy_script_fetcher, host_resolver, net_log, 59 proxy_script_fetcher, dhcp_proxy_script_fetcher, host_resolver, net_log,
60 network_delegate); 60 network_delegate);
61 } 61 }
62 62
63 } // namespace net 63 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698