Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2655)

Unified Diff: chrome/browser/io_thread.cc

Issue 1505063002: QUIC - FieldTrial parameters not do PreConnect if QUIC can do 0RTT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@disable_preconnect
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
&params->quic_close_sessions_on_ip_change);
globals.quic_idle_connection_timeout_seconds.CopyToIfSet(
&params->quic_idle_connection_timeout_seconds);
+ globals.quic_disable_preconnect_if_0rtt.CopyToIfSet(
+ &params->quic_disable_preconnect_if_0rtt);
globals.origin_to_force_quic_on.CopyToIfSet(
&params->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) {
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698