Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index 485999cd2f32102cbc84c80a9be39a9a4f0ea706..3f271565efebc8721988807344f85389a9ad0b93 100644 |
--- a/chrome/browser/io_thread.cc |
+++ b/chrome/browser/io_thread.cc |
@@ -1122,6 +1122,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals( |
¶ms->quic_close_sessions_on_ip_change); |
globals.quic_idle_connection_timeout_seconds.CopyToIfSet( |
¶ms->quic_idle_connection_timeout_seconds); |
+ globals.quic_disable_preconnect_if_0rtt.CopyToIfSet( |
+ ¶ms->quic_disable_preconnect_if_0rtt); |
globals.origin_to_force_quic_on.CopyToIfSet( |
¶ms->origin_to_force_quic_on); |
@@ -1259,6 +1261,8 @@ void IOThread::ConfigureQuicGlobals( |
globals->quic_idle_connection_timeout_seconds.set( |
idle_connection_timeout_seconds); |
} |
+ globals->quic_disable_preconnect_if_0rtt.set( |
+ ShouldQuicDisablePreConnectIfZeroRtt(quic_trial_params)); |
} |
size_t max_packet_length = GetQuicMaxPacketLength(command_line, |
@@ -1511,6 +1515,13 @@ int IOThread::GetQuicIdleConnectionTimeoutSeconds( |
return 0; |
} |
+bool IOThread::ShouldQuicDisablePreConnectIfZeroRtt( |
+ const VariationParameters& quic_trial_params) { |
+ return base::LowerCaseEqualsASCII( |
+ GetVariationParam(quic_trial_params, "disable_preconnect_if_0rtt"), |
+ "true"); |
+} |
+ |
size_t IOThread::GetQuicMaxPacketLength( |
const base::CommandLine& command_line, |
const VariationParameters& quic_trial_params) { |