| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 resource_context_.reset(); | 713 resource_context_.reset(); |
| 714 } | 714 } |
| 715 | 715 |
| 716 void ProfileIOData::PopulateNetworkSessionParams( | 716 void ProfileIOData::PopulateNetworkSessionParams( |
| 717 const ProfileParams* profile_params, | 717 const ProfileParams* profile_params, |
| 718 net::HttpNetworkSession::Params* params) const { | 718 net::HttpNetworkSession::Params* params) const { |
| 719 | 719 |
| 720 ChromeURLRequestContext* context = main_request_context(); | 720 ChromeURLRequestContext* context = main_request_context(); |
| 721 | 721 |
| 722 IOThread* const io_thread = profile_params->io_thread; | 722 IOThread* const io_thread = profile_params->io_thread; |
| 723 IOThread::Globals* const globals = io_thread->globals(); | 723 |
| 724 io_thread->InitializeNetworkSessionParams(params); |
| 724 | 725 |
| 725 params->host_resolver = context->host_resolver(); | 726 params->host_resolver = context->host_resolver(); |
| 726 params->cert_verifier = context->cert_verifier(); | 727 params->cert_verifier = context->cert_verifier(); |
| 727 params->server_bound_cert_service = context->server_bound_cert_service(); | 728 params->server_bound_cert_service = context->server_bound_cert_service(); |
| 728 params->transport_security_state = context->transport_security_state(); | 729 params->transport_security_state = context->transport_security_state(); |
| 729 params->proxy_service = context->proxy_service(); | 730 params->proxy_service = context->proxy_service(); |
| 730 params->ssl_session_cache_shard = GetSSLSessionCacheShard(); | 731 params->ssl_session_cache_shard = GetSSLSessionCacheShard(); |
| 731 params->ssl_config_service = context->ssl_config_service(); | 732 params->ssl_config_service = context->ssl_config_service(); |
| 732 params->http_auth_handler_factory = context->http_auth_handler_factory(); | 733 params->http_auth_handler_factory = context->http_auth_handler_factory(); |
| 733 params->network_delegate = context->network_delegate(); | 734 params->network_delegate = context->network_delegate(); |
| 734 params->http_server_properties = context->http_server_properties(); | 735 params->http_server_properties = context->http_server_properties(); |
| 735 params->net_log = context->net_log(); | 736 params->net_log = context->net_log(); |
| 736 params->host_mapping_rules = globals->host_mapping_rules.get(); | |
| 737 params->ignore_certificate_errors = globals->ignore_certificate_errors; | |
| 738 params->http_pipelining_enabled = globals->http_pipelining_enabled; | |
| 739 params->testing_fixed_http_port = globals->testing_fixed_http_port; | |
| 740 params->testing_fixed_https_port = globals->testing_fixed_https_port; | |
| 741 | |
| 742 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
| 743 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | |
| 744 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( | |
| 745 switches::kTrustedSpdyProxy); | |
| 746 } | |
| 747 } | 737 } |
| 748 | 738 |
| 749 void ProfileIOData::SetCookieSettingsForTesting( | 739 void ProfileIOData::SetCookieSettingsForTesting( |
| 750 CookieSettings* cookie_settings) { | 740 CookieSettings* cookie_settings) { |
| 751 DCHECK(!cookie_settings_.get()); | 741 DCHECK(!cookie_settings_.get()); |
| 752 cookie_settings_ = cookie_settings; | 742 cookie_settings_ = cookie_settings; |
| 753 } | 743 } |
| 754 | 744 |
| 755 void ProfileIOData::set_signin_names_for_testing( | 745 void ProfileIOData::set_signin_names_for_testing( |
| 756 SigninNamesOnIOThread* signin_names) { | 746 SigninNamesOnIOThread* signin_names) { |
| 757 signin_names_.reset(signin_names); | 747 signin_names_.reset(signin_names); |
| 758 } | 748 } |
| OLD | NEW |