OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 const std::string& user_agent, | 108 const std::string& user_agent, |
109 net::ProxyConfigService* net_proxy_config_service) | 109 net::ProxyConfigService* net_proxy_config_service) |
110 : user_agent_(user_agent), | 110 : user_agent_(user_agent), |
111 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 111 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { |
112 storage_.set_host_resolver( | 112 storage_.set_host_resolver( |
113 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 113 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
114 net::HostResolver::kDefaultRetryAttempts, | 114 net::HostResolver::kDefaultRetryAttempts, |
115 NULL)); | 115 NULL)); |
116 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( | 116 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
117 net_proxy_config_service, 0u, NULL)); | 117 net_proxy_config_service, 0u, NULL)); |
118 storage_.set_cert_verifier(new net::CertVerifier); | 118 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); |
119 storage_.set_ftp_transaction_factory( | 119 storage_.set_ftp_transaction_factory( |
120 new net::FtpNetworkLayer(host_resolver())); | 120 new net::FtpNetworkLayer(host_resolver())); |
121 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); | 121 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |
122 storage_.set_http_auth_handler_factory( | 122 storage_.set_http_auth_handler_factory( |
123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
124 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); | 124 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); |
125 | 125 |
126 net::HttpNetworkSession::Params session_params; | 126 net::HttpNetworkSession::Params session_params; |
127 session_params.host_resolver = host_resolver(); | 127 session_params.host_resolver = host_resolver(); |
128 session_params.cert_verifier = cert_verifier(); | 128 session_params.cert_verifier = cert_verifier(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 proxy_config_service_.release()); | 176 proxy_config_service_.release()); |
177 return url_request_context_; | 177 return url_request_context_; |
178 } | 178 } |
179 | 179 |
180 scoped_refptr<base::MessageLoopProxy> | 180 scoped_refptr<base::MessageLoopProxy> |
181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { | 181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { |
182 return io_message_loop_proxy_; | 182 return io_message_loop_proxy_; |
183 } | 183 } |
184 | 184 |
185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} | 185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} |
OLD | NEW |