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 "net/url_request/url_request_context_builder.h" | 5 #include "net/url_request/url_request_context_builder.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 request_context->cert_transparency_verifier(); | 224 request_context->cert_transparency_verifier(); |
225 session_context->ct_policy_enforcer = request_context->ct_policy_enforcer(); | 225 session_context->ct_policy_enforcer = request_context->ct_policy_enforcer(); |
226 session_context->proxy_service = request_context->proxy_service(); | 226 session_context->proxy_service = request_context->proxy_service(); |
227 session_context->ssl_config_service = request_context->ssl_config_service(); | 227 session_context->ssl_config_service = request_context->ssl_config_service(); |
228 session_context->http_auth_handler_factory = | 228 session_context->http_auth_handler_factory = |
229 request_context->http_auth_handler_factory(); | 229 request_context->http_auth_handler_factory(); |
230 session_context->http_server_properties = | 230 session_context->http_server_properties = |
231 request_context->http_server_properties(); | 231 request_context->http_server_properties(); |
232 session_context->net_log = request_context->net_log(); | 232 session_context->net_log = request_context->net_log(); |
233 session_context->channel_id_service = request_context->channel_id_service(); | 233 session_context->channel_id_service = request_context->channel_id_service(); |
| 234 session_context->network_quality_estimator = |
| 235 request_context->network_quality_estimator(); |
234 } | 236 } |
235 | 237 |
236 void URLRequestContextBuilder::EnableHttpCache(const HttpCacheParams& params) { | 238 void URLRequestContextBuilder::EnableHttpCache(const HttpCacheParams& params) { |
237 http_cache_enabled_ = true; | 239 http_cache_enabled_ = true; |
238 http_cache_params_ = params; | 240 http_cache_params_ = params; |
239 } | 241 } |
240 | 242 |
241 void URLRequestContextBuilder::DisableHttpCache() { | 243 void URLRequestContextBuilder::DisableHttpCache() { |
242 http_cache_enabled_ = false; | 244 http_cache_enabled_ = false; |
243 http_cache_params_ = HttpCacheParams(); | 245 http_cache_params_ = HttpCacheParams(); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 HttpNetworkSession::Context network_session_context; | 415 HttpNetworkSession::Context network_session_context; |
414 SetHttpNetworkSessionComponents(context.get(), &network_session_context); | 416 SetHttpNetworkSessionComponents(context.get(), &network_session_context); |
415 | 417 |
416 if (proxy_delegate_) { | 418 if (proxy_delegate_) { |
417 network_session_context.proxy_delegate = proxy_delegate_.get(); | 419 network_session_context.proxy_delegate = proxy_delegate_.get(); |
418 storage->set_proxy_delegate(std::move(proxy_delegate_)); | 420 storage->set_proxy_delegate(std::move(proxy_delegate_)); |
419 } | 421 } |
420 if (socket_performance_watcher_factory_) { | 422 if (socket_performance_watcher_factory_) { |
421 network_session_context.socket_performance_watcher_factory = | 423 network_session_context.socket_performance_watcher_factory = |
422 socket_performance_watcher_factory_; | 424 socket_performance_watcher_factory_; |
| 425 DCHECK(network_session_context.network_quality_estimator); |
423 } | 426 } |
424 | 427 |
425 storage->set_http_network_session(base::MakeUnique<HttpNetworkSession>( | 428 storage->set_http_network_session(base::MakeUnique<HttpNetworkSession>( |
426 http_network_session_params_, network_session_context)); | 429 http_network_session_params_, network_session_context)); |
427 | 430 |
428 std::unique_ptr<HttpTransactionFactory> http_transaction_factory; | 431 std::unique_ptr<HttpTransactionFactory> http_transaction_factory; |
429 if (http_cache_enabled_) { | 432 if (http_cache_enabled_) { |
430 std::unique_ptr<HttpCache::BackendFactory> http_cache_backend; | 433 std::unique_ptr<HttpCache::BackendFactory> http_cache_backend; |
431 if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) { | 434 if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) { |
432 BackendType backend_type = | 435 BackendType backend_type = |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 std::unique_ptr<ProxyConfigService> proxy_config_service, | 501 std::unique_ptr<ProxyConfigService> proxy_config_service, |
499 URLRequestContext* url_request_context, | 502 URLRequestContext* url_request_context, |
500 HostResolver* host_resolver, | 503 HostResolver* host_resolver, |
501 NetworkDelegate* network_delegate, | 504 NetworkDelegate* network_delegate, |
502 NetLog* net_log) { | 505 NetLog* net_log) { |
503 return ProxyService::CreateUsingSystemProxyResolver( | 506 return ProxyService::CreateUsingSystemProxyResolver( |
504 std::move(proxy_config_service), net_log); | 507 std::move(proxy_config_service), net_log); |
505 } | 508 } |
506 | 509 |
507 } // namespace net | 510 } // namespace net |
OLD | NEW |