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

Unified Diff: chrome/browser/io_thread.cc

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Rebase. Created 4 years, 11 months 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 fd438c0da1e52336418127ce2831c970b325aaea..4a012e171cfd9e231b53e4db8fb626f5253afc51 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1180,7 +1180,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
&params->quic_disable_preconnect_if_0rtt);
if (!globals.quic_host_whitelist.empty())
params->quic_host_whitelist = globals.quic_host_whitelist;
-
+ globals.quic_migrate_sessions_on_network_change.CopyToIfSet(
+ &params->quic_migrate_sessions_on_network_change);
globals.origin_to_force_quic_on.CopyToIfSet(
&params->origin_to_force_quic_on);
params->enable_user_alternate_protocol_ports =
@@ -1321,6 +1322,8 @@ void IOThread::ConfigureQuicGlobals(
ShouldQuicDisablePreConnectIfZeroRtt(quic_trial_params));
globals->quic_host_whitelist =
GetQuicHostWhitelist(command_line, quic_trial_params);
+ globals->quic_migrate_sessions_on_network_change.set(
+ ShouldQuicMigrateSessionsOnNetworkChange(quic_trial_params));
}
size_t max_packet_length = GetQuicMaxPacketLength(command_line,
@@ -1598,6 +1601,14 @@ std::unordered_set<std::string> IOThread::GetQuicHostWhitelist(
return hosts;
}
+bool IOThread::ShouldQuicMigrateSessionsOnNetworkChange(
+ const VariationParameters& quic_trial_params) {
+ return base::LowerCaseEqualsASCII(
+ GetVariationParam(quic_trial_params,
+ "migrate_sessions_on_network_change"),
+ "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