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

Side by Side Diff: remoting/host/url_request_context.cc

Issue 10831277: [net] Change factory methods for HostResolver and HostCache to return a scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary initialization; respond to review Created 8 years, 1 month 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/url_request/url_request_test_util.cc ('k') | sync/tools/sync_client.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 "remoting/host/url_request_context.h" 5 #include "remoting/host/url_request_context.h"
6 6
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "net/base/cert_verifier.h" 8 #include "net/base/cert_verifier.h"
9 #include "net/base/host_resolver.h" 9 #include "net/base/host_resolver.h"
10 #include "net/base/ssl_config_service_defaults.h" 10 #include "net/base/ssl_config_service_defaults.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 } // namespace 77 } // namespace
78 78
79 // TODO(willchan): This is largely copied from service_url_request_context.cc, 79 // TODO(willchan): This is largely copied from service_url_request_context.cc,
80 // which is in turn copied from some test code. Move it somewhere reusable. 80 // which is in turn copied from some test code. Move it somewhere reusable.
81 URLRequestContext::URLRequestContext( 81 URLRequestContext::URLRequestContext(
82 scoped_ptr<net::ProxyConfigService> proxy_config_service) 82 scoped_ptr<net::ProxyConfigService> proxy_config_service)
83 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { 83 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
84 scoped_ptr<VlogNetLog> net_log(new VlogNetLog()); 84 scoped_ptr<VlogNetLog> net_log(new VlogNetLog());
85 storage_.set_host_resolver( 85 storage_.set_host_resolver(
86 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 86 net::HostResolver::CreateDefaultResolver(net_log.get()));
87 net::HostResolver::kDefaultRetryAttempts,
88 net_log.get()));
89 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( 87 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
90 proxy_config_service.release(), 0u, net_log.get())); 88 proxy_config_service.release(), 0u, net_log.get()));
91 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); 89 storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
92 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); 90 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults);
93 storage_.set_http_auth_handler_factory( 91 storage_.set_http_auth_handler_factory(
94 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 92 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
95 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); 93 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl);
96 storage_.set_transport_security_state(new net::TransportSecurityState); 94 storage_.set_transport_security_state(new net::TransportSecurityState);
97 95
98 net::HttpNetworkSession::Params session_params; 96 net::HttpNetworkSession::Params session_params;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 129
132 scoped_refptr<base::SingleThreadTaskRunner> 130 scoped_refptr<base::SingleThreadTaskRunner>
133 URLRequestContextGetter::GetNetworkTaskRunner() const { 131 URLRequestContextGetter::GetNetworkTaskRunner() const {
134 return network_task_runner_; 132 return network_task_runner_;
135 } 133 }
136 134
137 URLRequestContextGetter::~URLRequestContextGetter() { 135 URLRequestContextGetter::~URLRequestContextGetter() {
138 } 136 }
139 137
140 } // namespace remoting 138 } // namespace remoting
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698