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

Side by Side Diff: chrome/service/net/service_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
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 "chrome/service/net/service_url_request_context.h" 5 #include "chrome/service/net/service_url_request_context.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) 7 #if defined(OS_POSIX) && !defined(OS_MACOSX)
8 #include <sys/utsname.h> 8 #include <sys/utsname.h>
9 #endif 9 #endif
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return user_agent; 103 return user_agent;
104 } 104 }
105 105
106 } // namespace 106 } // namespace
107 107
108 ServiceURLRequestContext::ServiceURLRequestContext( 108 ServiceURLRequestContext::ServiceURLRequestContext(
109 const std::string& user_agent, 109 const std::string& user_agent,
110 net::ProxyConfigService* net_proxy_config_service) 110 net::ProxyConfigService* net_proxy_config_service)
111 : user_agent_(user_agent), 111 : user_agent_(user_agent),
112 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { 112 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
113 storage_.set_host_resolver( 113 storage_.set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
114 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
115 net::HostResolver::kDefaultRetryAttempts,
116 NULL));
117 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( 114 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
118 net_proxy_config_service, 0u, NULL)); 115 net_proxy_config_service, 0u, NULL));
119 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); 116 storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
120 storage_.set_ftp_transaction_factory( 117 storage_.set_ftp_transaction_factory(
121 new net::FtpNetworkLayer(host_resolver())); 118 new net::FtpNetworkLayer(host_resolver()));
122 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); 119 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults);
123 storage_.set_http_auth_handler_factory( 120 storage_.set_http_auth_handler_factory(
124 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 121 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
125 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); 122 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl);
126 storage_.set_transport_security_state(new net::TransportSecurityState); 123 storage_.set_transport_security_state(new net::TransportSecurityState);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 proxy_config_service_.release())); 176 proxy_config_service_.release()));
180 return url_request_context_.get(); 177 return url_request_context_.get();
181 } 178 }
182 179
183 scoped_refptr<base::SingleThreadTaskRunner> 180 scoped_refptr<base::SingleThreadTaskRunner>
184 ServiceURLRequestContextGetter::GetNetworkTaskRunner() const { 181 ServiceURLRequestContextGetter::GetNetworkTaskRunner() const {
185 return network_task_runner_; 182 return network_task_runner_;
186 } 183 }
187 184
188 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} 185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {}
OLDNEW
« no previous file with comments | « chrome/browser/net/connection_tester.cc ('k') | content/shell/shell_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698