OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/url_request_context_factory.h" | 5 #include "chromecast/browser/url_request_context_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/threading/worker_pool.h" | 10 #include "base/threading/worker_pool.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 host_resolver_ = net::HostResolver::CreateDefaultResolver(NULL); | 200 host_resolver_ = net::HostResolver::CreateDefaultResolver(NULL); |
201 | 201 |
202 // TODO(lcwu): http://crbug.com/392352. For performance and security reasons, | 202 // TODO(lcwu): http://crbug.com/392352. For performance and security reasons, |
203 // a persistent (on-disk) HttpServerProperties and ChannelIDService might be | 203 // a persistent (on-disk) HttpServerProperties and ChannelIDService might be |
204 // desirable in the future. | 204 // desirable in the future. |
205 channel_id_service_.reset( | 205 channel_id_service_.reset( |
206 new net::ChannelIDService(new net::DefaultChannelIDStore(NULL), | 206 new net::ChannelIDService(new net::DefaultChannelIDStore(NULL), |
207 base::WorkerPool::GetTaskRunner(true))); | 207 base::WorkerPool::GetTaskRunner(true))); |
208 | 208 |
209 cert_verifier_.reset(net::CertVerifier::CreateDefault()); | 209 cert_verifier_ = net::CertVerifier::CreateDefault(); |
210 | 210 |
211 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 211 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
212 | 212 |
213 transport_security_state_.reset(new net::TransportSecurityState()); | 213 transport_security_state_.reset(new net::TransportSecurityState()); |
214 http_auth_handler_factory_.reset( | 214 http_auth_handler_factory_ = |
215 net::HttpAuthHandlerFactory::CreateDefault(host_resolver_.get())); | 215 net::HttpAuthHandlerFactory::CreateDefault(host_resolver_.get()); |
216 | 216 |
217 http_server_properties_.reset(new net::HttpServerPropertiesImpl); | 217 http_server_properties_.reset(new net::HttpServerPropertiesImpl); |
218 | 218 |
219 proxy_service_.reset(net::ProxyService::CreateUsingSystemProxyResolver( | 219 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( |
220 proxy_config_service_.release(), 0, NULL)); | 220 proxy_config_service_.release(), 0, NULL); |
221 system_dependencies_initialized_ = true; | 221 system_dependencies_initialized_ = true; |
222 } | 222 } |
223 | 223 |
224 void URLRequestContextFactory::InitializeMainContextDependencies( | 224 void URLRequestContextFactory::InitializeMainContextDependencies( |
225 net::HttpTransactionFactory* transaction_factory, | 225 net::HttpTransactionFactory* transaction_factory, |
226 content::ProtocolHandlerMap* protocol_handlers, | 226 content::ProtocolHandlerMap* protocol_handlers, |
227 content::URLRequestInterceptorScopedVector request_interceptors) { | 227 content::URLRequestInterceptorScopedVector request_interceptors) { |
228 if (main_dependencies_initialized_) | 228 if (main_dependencies_initialized_) |
229 return; | 229 return; |
230 | 230 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 408 |
409 void URLRequestContextFactory::InitializeNetworkDelegates() { | 409 void URLRequestContextFactory::InitializeNetworkDelegates() { |
410 app_network_delegate_->Initialize(false); | 410 app_network_delegate_->Initialize(false); |
411 LOG(INFO) << "Initialized app network delegate."; | 411 LOG(INFO) << "Initialized app network delegate."; |
412 system_network_delegate_->Initialize(false); | 412 system_network_delegate_->Initialize(false); |
413 LOG(INFO) << "Initialized system network delegate."; | 413 LOG(INFO) << "Initialized system network delegate."; |
414 } | 414 } |
415 | 415 |
416 } // namespace shell | 416 } // namespace shell |
417 } // namespace chromecast | 417 } // namespace chromecast |
OLD | NEW |