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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 globals_->ignore_certificate_errors = true; | 529 globals_->ignore_certificate_errors = true; |
530 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { | 530 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { |
531 globals_->testing_fixed_http_port = | 531 globals_->testing_fixed_http_port = |
532 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort); | 532 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort); |
533 } | 533 } |
534 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { | 534 if (command_line.HasSwitch(switches::kTestingFixedHttpsPort)) { |
535 globals_->testing_fixed_https_port = | 535 globals_->testing_fixed_https_port = |
536 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpsPort); | 536 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpsPort); |
537 } | 537 } |
538 globals_->enable_quic.set(ShouldEnableQuic(command_line)); | 538 globals_->enable_quic.set(ShouldEnableQuic(command_line)); |
539 if (command_line.HasSwitch(switches::kOriginPortToForceQuicOn)) { | 539 if (command_line.HasSwitch(switches::kOriginToForceQuicOn)) { |
540 globals_->origin_port_to_force_quic_on.set( | 540 net::HostPortPair quic_origin = |
541 GetSwitchValueAsInt(command_line, | 541 net::HostPortPair::FromString( |
542 switches::kOriginPortToForceQuicOn)); | 542 command_line.GetSwitchValueASCII(switches::kOriginToForceQuicOn)); |
| 543 if (!quic_origin.IsEmpty()) { |
| 544 globals_->origin_to_force_quic_on.set(quic_origin); |
| 545 } |
543 } | 546 } |
544 if (command_line.HasSwitch( | 547 if (command_line.HasSwitch( |
545 switches::kEnableUserAlternateProtocolPorts)) { | 548 switches::kEnableUserAlternateProtocolPorts)) { |
546 globals_->enable_user_alternate_protocol_ports = true; | 549 globals_->enable_user_alternate_protocol_ports = true; |
547 } | 550 } |
548 InitializeNetworkOptions(command_line); | 551 InitializeNetworkOptions(command_line); |
549 | 552 |
550 net::HttpNetworkSession::Params session_params; | 553 net::HttpNetworkSession::Params session_params; |
551 InitializeNetworkSessionParams(&session_params); | 554 InitializeNetworkSessionParams(&session_params); |
552 session_params.net_log = net_log_; | 555 session_params.net_log = net_log_; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 ¶ms->enable_spdy_ip_pooling); | 864 ¶ms->enable_spdy_ip_pooling); |
862 globals_->enable_spdy_credential_frames.CopyToIfSet( | 865 globals_->enable_spdy_credential_frames.CopyToIfSet( |
863 ¶ms->enable_spdy_credential_frames); | 866 ¶ms->enable_spdy_credential_frames); |
864 globals_->enable_spdy_compression.CopyToIfSet( | 867 globals_->enable_spdy_compression.CopyToIfSet( |
865 ¶ms->enable_spdy_compression); | 868 ¶ms->enable_spdy_compression); |
866 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( | 869 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( |
867 ¶ms->enable_spdy_ping_based_connection_checking); | 870 ¶ms->enable_spdy_ping_based_connection_checking); |
868 globals_->spdy_default_protocol.CopyToIfSet( | 871 globals_->spdy_default_protocol.CopyToIfSet( |
869 ¶ms->spdy_default_protocol); | 872 ¶ms->spdy_default_protocol); |
870 globals_->enable_quic.CopyToIfSet(¶ms->enable_quic); | 873 globals_->enable_quic.CopyToIfSet(¶ms->enable_quic); |
871 globals_->origin_port_to_force_quic_on.CopyToIfSet( | 874 globals_->origin_to_force_quic_on.CopyToIfSet( |
872 ¶ms->origin_port_to_force_quic_on); | 875 ¶ms->origin_to_force_quic_on); |
873 params->enable_user_alternate_protocol_ports = | 876 params->enable_user_alternate_protocol_ports = |
874 globals_->enable_user_alternate_protocol_ports; | 877 globals_->enable_user_alternate_protocol_ports; |
875 } | 878 } |
876 | 879 |
877 net::SSLConfigService* IOThread::GetSSLConfigService() { | 880 net::SSLConfigService* IOThread::GetSSLConfigService() { |
878 return ssl_config_service_manager_->Get(); | 881 return ssl_config_service_manager_->Get(); |
879 } | 882 } |
880 | 883 |
881 void IOThread::ChangedToOnTheRecordOnIOThread() { | 884 void IOThread::ChangedToOnTheRecordOnIOThread() { |
882 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 885 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 base::FieldTrialList::FindFullName(kQuicFieldTrialName); | 951 base::FieldTrialList::FindFullName(kQuicFieldTrialName); |
949 | 952 |
950 if (command_line.HasSwitch(switches::kDisableQuic)) | 953 if (command_line.HasSwitch(switches::kDisableQuic)) |
951 return false; | 954 return false; |
952 | 955 |
953 if (command_line.HasSwitch(switches::kEnableQuic)) | 956 if (command_line.HasSwitch(switches::kEnableQuic)) |
954 return true; | 957 return true; |
955 | 958 |
956 return quic_trial_group == kQuicFieldTrialEnabledGroupName; | 959 return quic_trial_group == kQuicFieldTrialEnabledGroupName; |
957 } | 960 } |
OLD | NEW |