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/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 } | 645 } |
646 | 646 |
647 void ProfileIOData::set_server_bound_cert_service( | 647 void ProfileIOData::set_server_bound_cert_service( |
648 net::ServerBoundCertService* server_bound_cert_service) const { | 648 net::ServerBoundCertService* server_bound_cert_service) const { |
649 server_bound_cert_service_.reset(server_bound_cert_service); | 649 server_bound_cert_service_.reset(server_bound_cert_service); |
650 } | 650 } |
651 | 651 |
652 void ProfileIOData::DestroyResourceContext() { | 652 void ProfileIOData::DestroyResourceContext() { |
653 resource_context_.reset(); | 653 resource_context_.reset(); |
654 } | 654 } |
| 655 |
| 656 void ProfileIOData::PopulateNetworkSessionParams( |
| 657 const ProfileParams* profile_params, |
| 658 net::HttpNetworkSession::Params* params) const { |
| 659 |
| 660 ChromeURLRequestContext* context = main_request_context(); |
| 661 |
| 662 IOThread* const io_thread = profile_params->io_thread; |
| 663 IOThread::Globals* const globals = io_thread->globals(); |
| 664 |
| 665 params->host_resolver = context->host_resolver(); |
| 666 params->cert_verifier = context->cert_verifier(); |
| 667 params->server_bound_cert_service = context->server_bound_cert_service(); |
| 668 params->transport_security_state = context->transport_security_state(); |
| 669 params->proxy_service = context->proxy_service(); |
| 670 params->ssl_session_cache_shard = GetSSLSessionCacheShard(); |
| 671 params->ssl_config_service = context->ssl_config_service(); |
| 672 params->http_auth_handler_factory = context->http_auth_handler_factory(); |
| 673 params->network_delegate = context->network_delegate(); |
| 674 params->http_server_properties = context->http_server_properties(); |
| 675 params->net_log = context->net_log(); |
| 676 params->host_mapping_rules = globals->host_mapping_rules.get(); |
| 677 params->ignore_certificate_errors = globals->ignore_certificate_errors; |
| 678 params->http_pipelining_enabled = globals->http_pipelining_enabled; |
| 679 params->testing_fixed_http_port = globals->testing_fixed_http_port; |
| 680 params->testing_fixed_https_port = globals->testing_fixed_https_port; |
| 681 |
| 682 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 683 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { |
| 684 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( |
| 685 switches::kTrustedSpdyProxy); |
| 686 } |
| 687 } |
OLD | NEW |