Chromium Code Reviews| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 return user_agent; | 102 return user_agent; |
| 103 } | 103 } |
| 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( |
|
cbentzel
2012/08/16 20:09:21
Could |set_host_resolver| change to take a scoped_
szym
2012/08/16 20:38:55
Ultimately, I'd strongly prefer that. If you can t
cbentzel
2012/08/16 21:20:26
I can. May want to get mmenke or willchan to chime
| |
| 113 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 113 net::HostResolver::CreateDefaultResolver(NULL).release()); |
| 114 net::HostResolver::kDefaultRetryAttempts, | |
| 115 NULL)); | |
| 116 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( | 114 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
| 117 net_proxy_config_service, 0u, NULL)); | 115 net_proxy_config_service, 0u, NULL)); |
| 118 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); | 116 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); |
| 119 storage_.set_ftp_transaction_factory( | 117 storage_.set_ftp_transaction_factory( |
| 120 new net::FtpNetworkLayer(host_resolver())); | 118 new net::FtpNetworkLayer(host_resolver())); |
| 121 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); | 119 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |
| 122 storage_.set_http_auth_handler_factory( | 120 storage_.set_http_auth_handler_factory( |
| 123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 121 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
| 124 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); | 122 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); |
| 125 storage_.set_transport_security_state(new net::TransportSecurityState); | 123 storage_.set_transport_security_state(new net::TransportSecurityState); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 proxy_config_service_.release())); | 175 proxy_config_service_.release())); |
| 178 return url_request_context_.get(); | 176 return url_request_context_.get(); |
| 179 } | 177 } |
| 180 | 178 |
| 181 scoped_refptr<base::SingleThreadTaskRunner> | 179 scoped_refptr<base::SingleThreadTaskRunner> |
| 182 ServiceURLRequestContextGetter::GetNetworkTaskRunner() const { | 180 ServiceURLRequestContextGetter::GetNetworkTaskRunner() const { |
| 183 return network_task_runner_; | 181 return network_task_runner_; |
| 184 } | 182 } |
| 185 | 183 |
| 186 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} | 184 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} |
| OLD | NEW |