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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 if (command_line.HasSwitch(switches::kEnableHttpPipelining)) | 488 if (command_line.HasSwitch(switches::kEnableHttpPipelining)) |
489 globals_->http_pipelining_enabled = true; | 489 globals_->http_pipelining_enabled = true; |
490 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { | 490 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { |
491 globals_->testing_fixed_http_port = | 491 globals_->testing_fixed_http_port = |
492 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort); | 492 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort); |
493 } | 493 } |
494 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { | 494 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { |
495 globals_->testing_fixed_https_port = | 495 globals_->testing_fixed_https_port = |
496 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpsPort); | 496 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpsPort); |
497 } | 497 } |
| 498 if (command_line.HasSwitch(switches::kForceQuicPort)) { |
| 499 globals_->force_quic_port.set( |
| 500 GetSwitchValueAsInt(command_line, switches::kForceQuicPort)); |
| 501 } |
498 | 502 |
499 InitializeNetworkOptions(command_line); | 503 InitializeNetworkOptions(command_line); |
500 | 504 |
501 net::HttpNetworkSession::Params session_params; | 505 net::HttpNetworkSession::Params session_params; |
502 InitializeNetworkSessionParams(&session_params); | 506 InitializeNetworkSessionParams(&session_params); |
503 session_params.net_log = net_log_; | 507 session_params.net_log = net_log_; |
504 session_params.proxy_service = | 508 session_params.proxy_service = |
505 globals_->proxy_script_fetcher_proxy_service.get(); | 509 globals_->proxy_script_fetcher_proxy_service.get(); |
506 | 510 |
507 scoped_refptr<net::HttpNetworkSession> network_session( | 511 scoped_refptr<net::HttpNetworkSession> network_session( |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 globals_->enable_spdy_ip_pooling.CopyToIfSet( | 794 globals_->enable_spdy_ip_pooling.CopyToIfSet( |
791 ¶ms->enable_spdy_ip_pooling); | 795 ¶ms->enable_spdy_ip_pooling); |
792 globals_->enable_spdy_credential_frames.CopyToIfSet( | 796 globals_->enable_spdy_credential_frames.CopyToIfSet( |
793 ¶ms->enable_spdy_credential_frames); | 797 ¶ms->enable_spdy_credential_frames); |
794 globals_->enable_spdy_compression.CopyToIfSet( | 798 globals_->enable_spdy_compression.CopyToIfSet( |
795 ¶ms->enable_spdy_compression); | 799 ¶ms->enable_spdy_compression); |
796 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( | 800 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( |
797 ¶ms->enable_spdy_ping_based_connection_checking); | 801 ¶ms->enable_spdy_ping_based_connection_checking); |
798 globals_->spdy_default_protocol.CopyToIfSet( | 802 globals_->spdy_default_protocol.CopyToIfSet( |
799 ¶ms->spdy_default_protocol); | 803 ¶ms->spdy_default_protocol); |
| 804 globals_->force_quic_port.CopyToIfSet(¶ms->force_quic_port); |
800 } | 805 } |
801 | 806 |
802 net::SSLConfigService* IOThread::GetSSLConfigService() { | 807 net::SSLConfigService* IOThread::GetSSLConfigService() { |
803 return ssl_config_service_manager_->Get(); | 808 return ssl_config_service_manager_->Get(); |
804 } | 809 } |
805 | 810 |
806 void IOThread::ChangedToOnTheRecordOnIOThread() { | 811 void IOThread::ChangedToOnTheRecordOnIOThread() { |
807 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 812 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
808 | 813 |
809 // Clear the host cache to avoid showing entries from the OTR session | 814 // Clear the host cache to avoid showing entries from the OTR session |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 globals_->system_request_context.reset( | 867 globals_->system_request_context.reset( |
863 ConstructSystemRequestContext(globals_, net_log_)); | 868 ConstructSystemRequestContext(globals_, net_log_)); |
864 | 869 |
865 sdch_manager_->set_sdch_fetcher( | 870 sdch_manager_->set_sdch_fetcher( |
866 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); | 871 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); |
867 } | 872 } |
868 | 873 |
869 void IOThread::UpdateDnsClientEnabled() { | 874 void IOThread::UpdateDnsClientEnabled() { |
870 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 875 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
871 } | 876 } |
OLD | NEW |