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

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: Fixes and responses to outstanding comments Created 5 years, 1 month 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
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 2301ab5ab5965f00311c4b15320e022f4d42f313..e4cae67daf3401b4ab6421fb10d39ccbb078e012 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1107,7 +1107,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
params->quic_connection_options = globals.quic_connection_options;
globals.quic_close_sessions_on_ip_change.CopyToIfSet(
&params->quic_close_sessions_on_ip_change);
-
+ globals.quic_migrate_sessions_on_net_change.CopyToIfSet(
+ &params->quic_migrate_sessions_on_net_change);
globals.origin_to_force_quic_on.CopyToIfSet(
&params->origin_to_force_quic_on);
params->enable_user_alternate_protocol_ports =
@@ -1242,6 +1243,8 @@ void IOThread::ConfigureQuicGlobals(
GetQuicConnectionOptions(command_line, quic_trial_params);
globals->quic_close_sessions_on_ip_change.set(
ShouldQuicCloseSessionsOnIpChange(quic_trial_params));
+ globals->quic_migrate_sessions_on_net_change.set(
+ ShouldQuicMigrateSessionsOnNetChange(quic_trial_params));
}
size_t max_packet_length = GetQuicMaxPacketLength(command_line,
@@ -1483,6 +1486,20 @@ bool IOThread::ShouldQuicCloseSessionsOnIpChange(
"true");
}
+bool IOThread::ShouldQuicMigrateSessionsOnNetChange(
+ const VariationParameters& quic_trial_params) {
+#if defined(OS_ANDROID)
+ &&base::android::BuildInfo::GetInstance()->sdk_int() >=
+ base::android::SDK_VERSION_LOLLIPOP
+ // Migration only implemented for Android versions >= L.
Ryan Hamilton 2015/11/17 14:37:10 I was thinking about this. This code is here becau
Jana 2015/11/18 04:31:41 Yeah -- I hadn't done that yet. But you're right t
pauljensen 2015/11/18 17:24:23 ya, adding a NetworkChangeNotifier API for this SG
Jana 2015/11/18 21:44:17 Yeah, I think this belongs in the NetworkChangeNot
Ryan Hamilton 2015/11/18 22:23:35 One idea might be to have NetworkChangeNotifier::A
Jana 2015/11/21 02:21:22 Ongoing in https://codereview.chromium.org/1454313
+ return base::LowerCaseEqualsASCII(
+ GetVariationParam(quic_trial_params,
+ "migrate_sessions_on_net_change"),
+ "true");
+#endif
+ return false;
+}
Ryan Hamilton 2015/11/17 04:57:27 Since this code is conditional, I'm surprised the
Jana 2015/11/18 04:31:41 code's not conditional anymore, so tests should be
+
size_t IOThread::GetQuicMaxPacketLength(
const base::CommandLine& command_line,
const VariationParameters& quic_trial_params) {

Powered by Google App Engine
This is Rietveld 408576698