OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/ios_chrome_io_thread.h" | 5 #include "ios/chrome/browser/ios_chrome_io_thread.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 globals.quic_enable_non_blocking_io.CopyToIfSet( | 657 globals.quic_enable_non_blocking_io.CopyToIfSet( |
658 ¶ms->quic_enable_non_blocking_io); | 658 ¶ms->quic_enable_non_blocking_io); |
659 globals.quic_prefer_aes.CopyToIfSet(¶ms->quic_prefer_aes); | 659 globals.quic_prefer_aes.CopyToIfSet(¶ms->quic_prefer_aes); |
660 globals.quic_disable_disk_cache.CopyToIfSet(¶ms->quic_disable_disk_cache); | 660 globals.quic_disable_disk_cache.CopyToIfSet(¶ms->quic_disable_disk_cache); |
661 globals.quic_max_number_of_lossy_connections.CopyToIfSet( | 661 globals.quic_max_number_of_lossy_connections.CopyToIfSet( |
662 ¶ms->quic_max_number_of_lossy_connections); | 662 ¶ms->quic_max_number_of_lossy_connections); |
663 globals.quic_packet_loss_threshold.CopyToIfSet( | 663 globals.quic_packet_loss_threshold.CopyToIfSet( |
664 ¶ms->quic_packet_loss_threshold); | 664 ¶ms->quic_packet_loss_threshold); |
665 globals.quic_socket_receive_buffer_size.CopyToIfSet( | 665 globals.quic_socket_receive_buffer_size.CopyToIfSet( |
666 ¶ms->quic_socket_receive_buffer_size); | 666 ¶ms->quic_socket_receive_buffer_size); |
667 globals.quic_delay_tcp_race.CopyToIfSet(¶ms->quic_delay_tcp_race); | |
668 params->enable_quic_port_selection = false; | 667 params->enable_quic_port_selection = false; |
669 globals.quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length); | 668 globals.quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length); |
670 globals.quic_user_agent_id.CopyToIfSet(¶ms->quic_user_agent_id); | 669 globals.quic_user_agent_id.CopyToIfSet(¶ms->quic_user_agent_id); |
671 globals.quic_supported_versions.CopyToIfSet(¶ms->quic_supported_versions); | 670 globals.quic_supported_versions.CopyToIfSet(¶ms->quic_supported_versions); |
672 params->quic_connection_options = globals.quic_connection_options; | 671 params->quic_connection_options = globals.quic_connection_options; |
673 globals.quic_close_sessions_on_ip_change.CopyToIfSet( | 672 globals.quic_close_sessions_on_ip_change.CopyToIfSet( |
674 ¶ms->quic_close_sessions_on_ip_change); | 673 ¶ms->quic_close_sessions_on_ip_change); |
675 | 674 |
676 params->enable_user_alternate_protocol_ports = false; | 675 params->enable_user_alternate_protocol_ports = false; |
677 } | 676 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 | 764 |
766 if (enable_quic) { | 765 if (enable_quic) { |
767 globals->quic_always_require_handshake_confirmation.set( | 766 globals->quic_always_require_handshake_confirmation.set( |
768 ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params)); | 767 ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params)); |
769 globals->quic_disable_connection_pooling.set( | 768 globals->quic_disable_connection_pooling.set( |
770 ShouldQuicDisableConnectionPooling(quic_trial_params)); | 769 ShouldQuicDisableConnectionPooling(quic_trial_params)); |
771 int receive_buffer_size = GetQuicSocketReceiveBufferSize(quic_trial_params); | 770 int receive_buffer_size = GetQuicSocketReceiveBufferSize(quic_trial_params); |
772 if (receive_buffer_size != 0) { | 771 if (receive_buffer_size != 0) { |
773 globals->quic_socket_receive_buffer_size.set(receive_buffer_size); | 772 globals->quic_socket_receive_buffer_size.set(receive_buffer_size); |
774 } | 773 } |
775 globals->quic_delay_tcp_race.set(ShouldQuicDelayTcpRace(quic_trial_params)); | |
776 float load_server_info_timeout_srtt_multiplier = | 774 float load_server_info_timeout_srtt_multiplier = |
777 GetQuicLoadServerInfoTimeoutSrttMultiplier(quic_trial_params); | 775 GetQuicLoadServerInfoTimeoutSrttMultiplier(quic_trial_params); |
778 if (load_server_info_timeout_srtt_multiplier != 0) { | 776 if (load_server_info_timeout_srtt_multiplier != 0) { |
779 globals->quic_load_server_info_timeout_srtt_multiplier.set( | 777 globals->quic_load_server_info_timeout_srtt_multiplier.set( |
780 load_server_info_timeout_srtt_multiplier); | 778 load_server_info_timeout_srtt_multiplier); |
781 } | 779 } |
782 globals->quic_enable_connection_racing.set( | 780 globals->quic_enable_connection_racing.set( |
783 ShouldQuicEnableConnectionRacing(quic_trial_params)); | 781 ShouldQuicEnableConnectionRacing(quic_trial_params)); |
784 globals->quic_enable_non_blocking_io.set( | 782 globals->quic_enable_non_blocking_io.set( |
785 ShouldQuicEnableNonBlockingIO(quic_trial_params)); | 783 ShouldQuicEnableNonBlockingIO(quic_trial_params)); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 const VariationParameters& quic_trial_params) { | 936 const VariationParameters& quic_trial_params) { |
939 int value; | 937 int value; |
940 if (base::StringToInt( | 938 if (base::StringToInt( |
941 GetVariationParam(quic_trial_params, "receive_buffer_size"), | 939 GetVariationParam(quic_trial_params, "receive_buffer_size"), |
942 &value)) { | 940 &value)) { |
943 return value; | 941 return value; |
944 } | 942 } |
945 return 0; | 943 return 0; |
946 } | 944 } |
947 | 945 |
948 bool IOSChromeIOThread::ShouldQuicDelayTcpRace( | |
949 const VariationParameters& quic_trial_params) { | |
950 return base::LowerCaseEqualsASCII( | |
951 GetVariationParam(quic_trial_params, "delay_tcp_race"), "true"); | |
952 } | |
953 | |
954 bool IOSChromeIOThread::ShouldQuicCloseSessionsOnIpChange( | 946 bool IOSChromeIOThread::ShouldQuicCloseSessionsOnIpChange( |
955 const VariationParameters& quic_trial_params) { | 947 const VariationParameters& quic_trial_params) { |
956 return base::LowerCaseEqualsASCII( | 948 return base::LowerCaseEqualsASCII( |
957 GetVariationParam(quic_trial_params, "close_sessions_on_ip_change"), | 949 GetVariationParam(quic_trial_params, "close_sessions_on_ip_change"), |
958 "true"); | 950 "true"); |
959 } | 951 } |
960 | 952 |
961 size_t IOSChromeIOThread::GetQuicMaxPacketLength( | 953 size_t IOSChromeIOThread::GetQuicMaxPacketLength( |
962 const VariationParameters& quic_trial_params) { | 954 const VariationParameters& quic_trial_params) { |
963 unsigned value; | 955 unsigned value; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 | 1023 |
1032 globals->system_http_network_session.reset( | 1024 globals->system_http_network_session.reset( |
1033 new net::HttpNetworkSession(system_params)); | 1025 new net::HttpNetworkSession(system_params)); |
1034 globals->system_http_transaction_factory.reset( | 1026 globals->system_http_transaction_factory.reset( |
1035 new net::HttpNetworkLayer(globals->system_http_network_session.get())); | 1027 new net::HttpNetworkLayer(globals->system_http_network_session.get())); |
1036 context->set_http_transaction_factory( | 1028 context->set_http_transaction_factory( |
1037 globals->system_http_transaction_factory.get()); | 1029 globals->system_http_transaction_factory.get()); |
1038 | 1030 |
1039 return context; | 1031 return context; |
1040 } | 1032 } |
OLD | NEW |