| Index: net/quic/quic_stream_factory.h
|
| diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
|
| index b46854adb166fef9ba654b2da180f511d5abdde9..721532de1d0e1034ee57eecabd1a5c59638de0e8 100644
|
| --- a/net/quic/quic_stream_factory.h
|
| +++ b/net/quic/quic_stream_factory.h
|
| @@ -103,6 +103,7 @@ class NET_EXPORT_PRIVATE QuicStreamRequest {
|
| // QuicChromiumClientSessions.
|
| class NET_EXPORT_PRIVATE QuicStreamFactory
|
| : public NetworkChangeNotifier::IPAddressObserver,
|
| + public NetworkChangeNotifier::NetworkObserver,
|
| public SSLConfigService::Observer,
|
| public CertDatabase::Observer {
|
| public:
|
| @@ -138,6 +139,7 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
|
| bool delay_tcp_race,
|
| bool store_server_configs_in_properties,
|
| bool close_sessions_on_ip_change,
|
| + bool migrate_sessions_on_net_change,
|
| const QuicTagVector& connection_options);
|
| ~QuicStreamFactory() override;
|
|
|
| @@ -199,12 +201,39 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
|
| // Delete all cached state objects in |crypto_config_|.
|
| void ClearCachedStatesInCryptoConfig();
|
|
|
| + // Helper method that creates and returns a DatagramClientSocket.
|
| + scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
|
| + const QuicServerId& server_id,
|
| + const BoundNetLog& net_log);
|
| +
|
| + // Helper method that configures a DatagramClientSocket.
|
| + // Returns net_error code.
|
| + int ConfigureDatagramClientSocket(
|
| + DatagramClientSocket* socket,
|
| + IPEndPoint addr,
|
| + NetworkChangeNotifier::NetworkHandle network);
|
| +
|
| + // Helper method that initiates migration of active sessions away from
|
| + // |network| if possible, and if not, closes them. Migration is only
|
| + // attempted on active sessions; idle sessions are closed.
|
| + void MigrateOrCloseSessions(NetworkChangeNotifier::NetworkHandle);
|
| +
|
| // NetworkChangeNotifier::IPAddressObserver methods:
|
|
|
| // Until the servers support roaming, close all connections when the local
|
| // IP address changes.
|
| void OnIPAddressChanged() override;
|
|
|
| + // NetworkChangeNotifier::NetworkObserver methods:
|
| + void OnNetworkConnected(
|
| + NetworkChangeNotifier::NetworkHandle network) override;
|
| + void OnNetworkDisconnected(
|
| + NetworkChangeNotifier::NetworkHandle network) override;
|
| + void OnNetworkSoonToDisconnect(
|
| + NetworkChangeNotifier::NetworkHandle network) override;
|
| + void OnNetworkMadeDefault(
|
| + NetworkChangeNotifier::NetworkHandle network) override;
|
| +
|
| // SSLConfigService::Observer methods:
|
|
|
| // We perform the same flushing as described above when SSL settings change.
|
| @@ -441,6 +470,10 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
|
| // Set if all sessions should be closed when any local IP address changes.
|
| const bool close_sessions_on_ip_change_;
|
|
|
| + // Set if migration should be attempted on active sessions when primary
|
| + // interface changes.
|
| + const bool migrate_sessions_on_net_change_;
|
| +
|
| // Each profile will (probably) have a unique port_seed_ value. This value
|
| // is used to help seed a pseudo-random number generator (PortSuggester) so
|
| // that we consistently (within this profile) suggest the same ephemeral
|
|
|