| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 } // namespace | 105 } // namespace |
| 106 | 106 |
| 107 ServiceURLRequestContext::ServiceURLRequestContext( | 107 ServiceURLRequestContext::ServiceURLRequestContext( |
| 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 NULL)); | 115 NULL)); |
| 115 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( | 116 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
| 116 net_proxy_config_service, 0u, NULL)); | 117 net_proxy_config_service, 0u, NULL)); |
| 117 storage_.set_cert_verifier(new net::CertVerifier); | 118 storage_.set_cert_verifier(new net::CertVerifier); |
| 118 storage_.set_dnsrr_resolver(new net::DnsRRResolver); | 119 storage_.set_dnsrr_resolver(new net::DnsRRResolver); |
| 119 storage_.set_ftp_transaction_factory( | 120 storage_.set_ftp_transaction_factory( |
| 120 new net::FtpNetworkLayer(host_resolver())); | 121 new net::FtpNetworkLayer(host_resolver())); |
| 121 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); | 122 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |
| 122 storage_.set_http_auth_handler_factory( | 123 storage_.set_http_auth_handler_factory( |
| 123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 124 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 proxy_config_service_.release()); | 176 proxy_config_service_.release()); |
| 176 return url_request_context_; | 177 return url_request_context_; |
| 177 } | 178 } |
| 178 | 179 |
| 179 scoped_refptr<base::MessageLoopProxy> | 180 scoped_refptr<base::MessageLoopProxy> |
| 180 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { | 181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { |
| 181 return io_message_loop_proxy_; | 182 return io_message_loop_proxy_; |
| 182 } | 183 } |
| 183 | 184 |
| 184 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} | 185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} |
| OLD | NEW |