| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 context->set_net_log(net_log_); | 329 context->set_net_log(net_log_); |
| 330 } else { | 330 } else { |
| 331 storage->set_net_log(base::WrapUnique(new NetLog)); | 331 storage->set_net_log(base::WrapUnique(new NetLog)); |
| 332 } | 332 } |
| 333 | 333 |
| 334 if (!host_resolver_) { | 334 if (!host_resolver_) { |
| 335 host_resolver_ = HostResolver::CreateDefaultResolver(context->net_log()); | 335 host_resolver_ = HostResolver::CreateDefaultResolver(context->net_log()); |
| 336 } | 336 } |
| 337 storage->set_host_resolver(std::move(host_resolver_)); | 337 storage->set_host_resolver(std::move(host_resolver_)); |
| 338 | 338 |
| 339 storage->set_ssl_config_service(new SSLConfigServiceDefaults); | 339 if (ssl_config_service_) { |
| 340 // This takes a raw pointer, but |storage| will hold onto a reference to the |
| 341 // service. |
| 342 storage->set_ssl_config_service(ssl_config_service_.get()); |
| 343 } else { |
| 344 storage->set_ssl_config_service(new SSLConfigServiceDefaults); |
| 345 } |
| 340 | 346 |
| 341 if (!http_auth_handler_factory_) { | 347 if (!http_auth_handler_factory_) { |
| 342 http_auth_handler_factory_ = | 348 http_auth_handler_factory_ = |
| 343 HttpAuthHandlerRegistryFactory::CreateDefault(context->host_resolver()); | 349 HttpAuthHandlerRegistryFactory::CreateDefault(context->host_resolver()); |
| 344 } | 350 } |
| 345 | 351 |
| 346 storage->set_http_auth_handler_factory(std::move(http_auth_handler_factory_)); | 352 storage->set_http_auth_handler_factory(std::move(http_auth_handler_factory_)); |
| 347 | 353 |
| 348 if (cookie_store_set_by_client_) { | 354 if (cookie_store_set_by_client_) { |
| 349 storage->set_cookie_store(std::move(cookie_store_)); | 355 storage->set_cookie_store(std::move(cookie_store_)); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 std::unique_ptr<ProxyConfigService> proxy_config_service, | 511 std::unique_ptr<ProxyConfigService> proxy_config_service, |
| 506 URLRequestContext* url_request_context, | 512 URLRequestContext* url_request_context, |
| 507 HostResolver* host_resolver, | 513 HostResolver* host_resolver, |
| 508 NetworkDelegate* network_delegate, | 514 NetworkDelegate* network_delegate, |
| 509 NetLog* net_log) { | 515 NetLog* net_log) { |
| 510 return ProxyService::CreateUsingSystemProxyResolver( | 516 return ProxyService::CreateUsingSystemProxyResolver( |
| 511 std::move(proxy_config_service), net_log); | 517 std::move(proxy_config_service), net_log); |
| 512 } | 518 } |
| 513 | 519 |
| 514 } // namespace net | 520 } // namespace net |
| OLD | NEW |