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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpsPort); | 522 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpsPort); |
523 } | 523 } |
524 if (command_line.HasSwitch(switches::kEnableQuic)) { | 524 if (command_line.HasSwitch(switches::kEnableQuic)) { |
525 globals_->enable_quic.set(true); | 525 globals_->enable_quic.set(true); |
526 } | 526 } |
527 if (command_line.HasSwitch(switches::kOriginPortToForceQuicOn)) { | 527 if (command_line.HasSwitch(switches::kOriginPortToForceQuicOn)) { |
528 globals_->origin_port_to_force_quic_on.set( | 528 globals_->origin_port_to_force_quic_on.set( |
529 GetSwitchValueAsInt(command_line, | 529 GetSwitchValueAsInt(command_line, |
530 switches::kOriginPortToForceQuicOn)); | 530 switches::kOriginPortToForceQuicOn)); |
531 } | 531 } |
532 if (command_line.HasSwitch(switches::kUseSpdyOverQuic)) { | |
533 globals_->use_spdy_over_quic.set(true); | |
534 } | |
535 if (command_line.HasSwitch( | 532 if (command_line.HasSwitch( |
536 switches::kEnableUserAlternateProtocolPorts)) { | 533 switches::kEnableUserAlternateProtocolPorts)) { |
537 globals_->enable_user_alternate_protocol_ports = true; | 534 globals_->enable_user_alternate_protocol_ports = true; |
538 } | 535 } |
539 InitializeNetworkOptions(command_line); | 536 InitializeNetworkOptions(command_line); |
540 | 537 |
541 net::HttpNetworkSession::Params session_params; | 538 net::HttpNetworkSession::Params session_params; |
542 InitializeNetworkSessionParams(&session_params); | 539 InitializeNetworkSessionParams(&session_params); |
543 session_params.net_log = net_log_; | 540 session_params.net_log = net_log_; |
544 session_params.proxy_service = | 541 session_params.proxy_service = |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 ¶ms->enable_spdy_credential_frames); | 832 ¶ms->enable_spdy_credential_frames); |
836 globals_->enable_spdy_compression.CopyToIfSet( | 833 globals_->enable_spdy_compression.CopyToIfSet( |
837 ¶ms->enable_spdy_compression); | 834 ¶ms->enable_spdy_compression); |
838 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( | 835 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( |
839 ¶ms->enable_spdy_ping_based_connection_checking); | 836 ¶ms->enable_spdy_ping_based_connection_checking); |
840 globals_->spdy_default_protocol.CopyToIfSet( | 837 globals_->spdy_default_protocol.CopyToIfSet( |
841 ¶ms->spdy_default_protocol); | 838 ¶ms->spdy_default_protocol); |
842 globals_->enable_quic.CopyToIfSet(¶ms->enable_quic); | 839 globals_->enable_quic.CopyToIfSet(¶ms->enable_quic); |
843 globals_->origin_port_to_force_quic_on.CopyToIfSet( | 840 globals_->origin_port_to_force_quic_on.CopyToIfSet( |
844 ¶ms->origin_port_to_force_quic_on); | 841 ¶ms->origin_port_to_force_quic_on); |
845 globals_->use_spdy_over_quic.CopyToIfSet(¶ms->use_spdy_over_quic); | |
846 params->enable_user_alternate_protocol_ports = | 842 params->enable_user_alternate_protocol_ports = |
847 globals_->enable_user_alternate_protocol_ports; | 843 globals_->enable_user_alternate_protocol_ports; |
848 } | 844 } |
849 | 845 |
850 net::SSLConfigService* IOThread::GetSSLConfigService() { | 846 net::SSLConfigService* IOThread::GetSSLConfigService() { |
851 return ssl_config_service_manager_->Get(); | 847 return ssl_config_service_manager_->Get(); |
852 } | 848 } |
853 | 849 |
854 void IOThread::ChangedToOnTheRecordOnIOThread() { | 850 void IOThread::ChangedToOnTheRecordOnIOThread() { |
855 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 851 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 globals_->system_request_context.reset( | 902 globals_->system_request_context.reset( |
907 ConstructSystemRequestContext(globals_, net_log_)); | 903 ConstructSystemRequestContext(globals_, net_log_)); |
908 | 904 |
909 sdch_manager_->set_sdch_fetcher( | 905 sdch_manager_->set_sdch_fetcher( |
910 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); | 906 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); |
911 } | 907 } |
912 | 908 |
913 void IOThread::UpdateDnsClientEnabled() { | 909 void IOThread::UpdateDnsClientEnabled() { |
914 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 910 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
915 } | 911 } |
OLD | NEW |