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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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_mojo_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 <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
9 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
10 #include "net/dns/mojo_host_resolver_impl.h" 12 #include "net/dns/mojo_host_resolver_impl.h"
11 #include "net/interfaces/proxy_resolver_service.mojom.h" 13 #include "net/interfaces/proxy_resolver_service.mojom.h"
12 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h" 14 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h"
13 #include "net/proxy/mojo_proxy_resolver_factory.h" 15 #include "net/proxy/mojo_proxy_resolver_factory.h"
14 #include "net/proxy/mojo_proxy_resolver_impl.h" 16 #include "net/proxy/mojo_proxy_resolver_impl.h"
15 #include "net/proxy/network_delegate_error_observer.h" 17 #include "net/proxy/network_delegate_error_observer.h"
16 #include "net/proxy/proxy_resolver_factory.h" 18 #include "net/proxy/proxy_resolver_factory.h"
(...skipping 10 matching lines...) Expand all
27 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher, 29 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
28 HostResolver* host_resolver, 30 HostResolver* host_resolver,
29 NetLog* net_log, 31 NetLog* net_log,
30 NetworkDelegate* network_delegate) { 32 NetworkDelegate* network_delegate) {
31 DCHECK(proxy_config_service); 33 DCHECK(proxy_config_service);
32 DCHECK(proxy_script_fetcher); 34 DCHECK(proxy_script_fetcher);
33 DCHECK(dhcp_proxy_script_fetcher); 35 DCHECK(dhcp_proxy_script_fetcher);
34 DCHECK(host_resolver); 36 DCHECK(host_resolver);
35 37
36 scoped_ptr<ProxyService> proxy_service(new ProxyService( 38 scoped_ptr<ProxyService> proxy_service(new ProxyService(
37 proxy_config_service.Pass(), 39 std::move(proxy_config_service),
38 make_scoped_ptr(new ProxyResolverFactoryMojo( 40 make_scoped_ptr(new ProxyResolverFactoryMojo(
39 mojo_proxy_factory, host_resolver, 41 mojo_proxy_factory, host_resolver,
40 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate, 42 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
41 base::ThreadTaskRunnerHandle::Get()), 43 base::ThreadTaskRunnerHandle::Get()),
42 net_log)), 44 net_log)),
43 net_log)); 45 net_log));
44 46
45 // Configure fetchers to use for PAC script downloads and auto-detect. 47 // Configure fetchers to use for PAC script downloads and auto-detect.
46 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, 48 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher,
47 dhcp_proxy_script_fetcher.Pass()); 49 std::move(dhcp_proxy_script_fetcher));
48 50
49 return proxy_service; 51 return proxy_service;
50 } 52 }
51 53
52 scoped_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess( 54 scoped_ptr<ProxyService> CreateProxyServiceUsingMojoInProcess(
53 scoped_ptr<ProxyConfigService> proxy_config_service, 55 scoped_ptr<ProxyConfigService> proxy_config_service,
54 ProxyScriptFetcher* proxy_script_fetcher, 56 ProxyScriptFetcher* proxy_script_fetcher,
55 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher, 57 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
56 HostResolver* host_resolver, 58 HostResolver* host_resolver,
57 NetLog* net_log, 59 NetLog* net_log,
58 NetworkDelegate* network_delegate) { 60 NetworkDelegate* network_delegate) {
59 return CreateProxyServiceUsingMojoFactory( 61 return CreateProxyServiceUsingMojoFactory(
60 InProcessMojoProxyResolverFactory::GetInstance(), 62 InProcessMojoProxyResolverFactory::GetInstance(),
61 proxy_config_service.Pass(), proxy_script_fetcher, 63 std::move(proxy_config_service), proxy_script_fetcher,
62 dhcp_proxy_script_fetcher.Pass(), host_resolver, net_log, 64 std::move(dhcp_proxy_script_fetcher), host_resolver, net_log,
63 network_delegate); 65 network_delegate);
64 } 66 }
65 67
66 } // namespace net 68 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/proxy/proxy_service_mojo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698