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

Unified Diff: net/quic/quic_stream_factory.h

Issue 1614573002: Minor refactor of MaybeMigrateOrCloseSessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Comment nit. 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 | « no previous file | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index 9a7cfe5e74e60496e85c1bbb032ed5cdbd0dbf87..b19c83ad98da5c06a0617db8c18be0295dae39d3 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -226,7 +226,13 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
IPEndPoint addr,
NetworkChangeNotifier::NetworkHandle network);
- // Helper method that initiates migration of active sessions
+ // Finds an alternative to |old_network| from the platform's list of connected
+ // networks. Returns NetworkChangeNotifier::kInvalidNetworkHandle if no
+ // alternative is found.
+ NetworkChangeNotifier::NetworkHandle FindAlternateNetwork(
+ NetworkChangeNotifier::NetworkHandle old_network);
+
+ // Method that initiates migration of active sessions
// currently bound to |network| to an alternate network, if one
// exists. Idle sessions bound to |network| are closed. If there is
// no alternate network to migrate active sessions onto, active
@@ -235,6 +241,16 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
void MaybeMigrateOrCloseSessions(NetworkChangeNotifier::NetworkHandle network,
bool force_close);
+ // Method that initiates early migration of |session| if |session| is
+ // active and if there is an alternate network than the one to which
+ // |session| is currently bound.
+ void MaybeMigrateSessionEarly(QuicChromiumClientSession* session);
+
+ // Method that migrates |session| over to using |new_network|.
+ void MigrateSessionToNetwork(
+ QuicChromiumClientSession* session,
+ NetworkChangeNotifier::NetworkHandle new_network);
+
// NetworkChangeNotifier::IPAddressObserver methods:
// Until the servers support roaming, close all connections when the local
« no previous file with comments | « no previous file | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698