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

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

Issue 1273013004: Returning scoped_ptr<> instead of raw pointer in DhcpProxyScriptFetcherFactory::Create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_v8.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "net/proxy/network_delegate_error_observer.h" 10 #include "net/proxy/network_delegate_error_observer.h"
11 #include "net/proxy/proxy_resolver.h" 11 #include "net/proxy/proxy_resolver.h"
12 #include "net/proxy/proxy_resolver_factory.h" 12 #include "net/proxy/proxy_resolver_factory.h"
13 #include "net/proxy/proxy_resolver_v8_tracing_wrapper.h" 13 #include "net/proxy/proxy_resolver_v8_tracing_wrapper.h"
14 #include "net/proxy/proxy_service.h" 14 #include "net/proxy/proxy_service.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 // static 18 // static
19 ProxyService* CreateProxyServiceUsingV8ProxyResolver( 19 ProxyService* CreateProxyServiceUsingV8ProxyResolver(
20 ProxyConfigService* proxy_config_service, 20 ProxyConfigService* proxy_config_service,
21 ProxyScriptFetcher* proxy_script_fetcher, 21 ProxyScriptFetcher* proxy_script_fetcher,
22 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, 22 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher,
23 HostResolver* host_resolver, 23 HostResolver* host_resolver,
24 NetLog* net_log, 24 NetLog* net_log,
25 NetworkDelegate* network_delegate) { 25 NetworkDelegate* network_delegate) {
26 DCHECK(proxy_config_service); 26 DCHECK(proxy_config_service);
27 DCHECK(proxy_script_fetcher); 27 DCHECK(proxy_script_fetcher);
28 DCHECK(dhcp_proxy_script_fetcher); 28 DCHECK(dhcp_proxy_script_fetcher);
29 DCHECK(host_resolver); 29 DCHECK(host_resolver);
30 30
31 ProxyService* proxy_service = new ProxyService( 31 ProxyService* proxy_service = new ProxyService(
32 proxy_config_service, 32 proxy_config_service,
33 make_scoped_ptr(new ProxyResolverFactoryV8TracingWrapper( 33 make_scoped_ptr(new ProxyResolverFactoryV8TracingWrapper(
34 host_resolver, net_log, 34 host_resolver, net_log,
35 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate, 35 base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
36 base::ThreadTaskRunnerHandle::Get()))), 36 base::ThreadTaskRunnerHandle::Get()))),
37 net_log); 37 net_log);
38 38
39 // Configure fetchers to use for PAC script downloads and auto-detect. 39 // Configure fetchers to use for PAC script downloads and auto-detect.
40 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, 40 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher,
41 dhcp_proxy_script_fetcher); 41 dhcp_proxy_script_fetcher.Pass());
42 42
43 return proxy_service; 43 return proxy_service;
44 } 44 }
45 45
46 } // namespace net 46 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service_v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698