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

Unified Diff: net/quic/chromium/quic_chromium_client_session.h

Issue 2329853002: Introduces ability for session to wait on a migration trigger for a new (Closed)
Patch Set: sync Created 4 years, 3 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
Index: net/quic/chromium/quic_chromium_client_session.h
diff --git a/net/quic/chromium/quic_chromium_client_session.h b/net/quic/chromium/quic_chromium_client_session.h
index 35f0ee888a46772af09bfea390a90b869352c7bf..df701db641058f9e088dcd63d9c5aecc042374ca 100644
--- a/net/quic/chromium/quic_chromium_client_session.h
+++ b/net/quic/chromium/quic_chromium_client_session.h
@@ -273,6 +273,19 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession
std::unique_ptr<QuicChromiumPacketReader> reader,
std::unique_ptr<QuicChromiumPacketWriter> writer);
+ // Method to call when NetworkChangeNotifier notifies observers of a
+ // new network. Tries to migrate any sessions that are waiting for a
+ // new network to connect.
Ryan Hamilton 2016/09/13 00:33:18 nit: This comment talks about "any sessions" but p
Jana 2016/09/13 01:12:19 Fixed comment.
+ void OnNetworkConnected(NetworkChangeNotifier::NetworkHandle network,
+ const BoundNetLog& bound_net_log);
+
+ // Schedules a migration alarm if one isn't already pending to wait
+ // for a new network.
+ void OnNoNewNetwork();
+
+ // If migration alarm was not cancelled, closes session with error.
+ void OnMigrationTimeout();
+
// Populates network error details for this session.
void PopulateNetErrorDetails(NetErrorDetails* details);
@@ -379,6 +392,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession
// sockets_.size(). Then in MigrateSessionOnError, check to see if
// the current sockets_.size() == the passed in value.
bool migration_pending_; // True while migration is underway.
+ bool migration_alarm_pending_; // True when migration alarm is armed.
base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession);

Powered by Google App Engine
This is Rietveld 408576698