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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_config_service_linux_unittest.cc ('k') | net/quic/quic_http_stream_test.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 (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 "net/proxy/network_delegate_error_observer.h" 8 #include "net/proxy/network_delegate_error_observer.h"
9 #include "net/proxy/proxy_resolver.h" 9 #include "net/proxy/proxy_resolver.h"
10 #include "net/proxy/proxy_resolver_v8_tracing.h" 10 #include "net/proxy/proxy_resolver_v8_tracing.h"
11 #include "net/proxy/proxy_service.h" 11 #include "net/proxy/proxy_service.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 // static 15 // static
16 ProxyService* CreateProxyServiceUsingV8ProxyResolver( 16 ProxyService* CreateProxyServiceUsingV8ProxyResolver(
17 ProxyConfigService* proxy_config_service, 17 ProxyConfigService* proxy_config_service,
18 ProxyScriptFetcher* proxy_script_fetcher, 18 ProxyScriptFetcher* proxy_script_fetcher,
19 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, 19 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
20 HostResolver* host_resolver, 20 HostResolver* host_resolver,
21 NetLog* net_log, 21 NetLog* net_log,
22 NetworkDelegate* network_delegate) { 22 NetworkDelegate* network_delegate) {
23 DCHECK(proxy_config_service); 23 DCHECK(proxy_config_service);
24 DCHECK(proxy_script_fetcher); 24 DCHECK(proxy_script_fetcher);
25 DCHECK(dhcp_proxy_script_fetcher); 25 DCHECK(dhcp_proxy_script_fetcher);
26 DCHECK(host_resolver); 26 DCHECK(host_resolver);
27 27
28 ProxyResolverErrorObserver* error_observer = 28 ProxyResolverErrorObserver* error_observer = new NetworkDelegateErrorObserver(
29 new NetworkDelegateErrorObserver( 29 network_delegate, base::MessageLoopProxy::current().get());
30 network_delegate, base::MessageLoopProxy::current());
31 30
32 ProxyResolver* proxy_resolver = 31 ProxyResolver* proxy_resolver =
33 new ProxyResolverV8Tracing(host_resolver, error_observer, net_log); 32 new ProxyResolverV8Tracing(host_resolver, error_observer, net_log);
34 33
35 ProxyService* proxy_service = 34 ProxyService* proxy_service =
36 new ProxyService(proxy_config_service, proxy_resolver, net_log); 35 new ProxyService(proxy_config_service, proxy_resolver, net_log);
37 36
38 // Configure fetchers to use for PAC script downloads and auto-detect. 37 // Configure fetchers to use for PAC script downloads and auto-detect.
39 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, 38 proxy_service->SetProxyScriptFetchers(proxy_script_fetcher,
40 dhcp_proxy_script_fetcher); 39 dhcp_proxy_script_fetcher);
41 40
42 return proxy_service; 41 return proxy_service;
43 } 42 }
44 43
45 } // namespace net 44 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux_unittest.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698