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

Side by Side Diff: net/quic/chromium/quic_stream_factory.h

Issue 2258893004: Changes connection migration code to migrate on NetworkMadeDefault (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ 5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_
6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 int ConfigureSocket(DatagramClientSocket* socket, 276 int ConfigureSocket(DatagramClientSocket* socket,
277 IPEndPoint addr, 277 IPEndPoint addr,
278 NetworkChangeNotifier::NetworkHandle network); 278 NetworkChangeNotifier::NetworkHandle network);
279 279
280 // Finds an alternative to |old_network| from the platform's list of connected 280 // Finds an alternative to |old_network| from the platform's list of connected
281 // networks. Returns NetworkChangeNotifier::kInvalidNetworkHandle if no 281 // networks. Returns NetworkChangeNotifier::kInvalidNetworkHandle if no
282 // alternative is found. 282 // alternative is found.
283 NetworkChangeNotifier::NetworkHandle FindAlternateNetwork( 283 NetworkChangeNotifier::NetworkHandle FindAlternateNetwork(
284 NetworkChangeNotifier::NetworkHandle old_network); 284 NetworkChangeNotifier::NetworkHandle old_network);
285 285
286 // Method that initiates migration of active sessions 286 // Method that initiates migration of active sessions to |new_network|.
287 // currently bound to |network| to an alternate network, if one 287 // If |new_network| is a valid network, sessions that can migrate are migrated
288 // exists. Idle sessions bound to |network| are closed. If there is 288 // to |new_network|, and sessions not bound to |new_network| are left
289 // no alternate network to migrate active sessions onto, active 289 // unchanged. Sessions with non-migratable streams are left unchanged.
290 // sessions are closed if |force_close| is true, and continue using 290 //
291 // |network| otherwise. Sessions not bound to |network| are left unchanged. 291 // If |new_network| is NetworkChangeNotifier::kInvalidNetworkHandle,
292 void MaybeMigrateOrCloseSessions(NetworkChangeNotifier::NetworkHandle network, 292 // there is no new network to migrate sessions onto. Active sessions
293 bool force_close, 293 // are closed if |force_close| is true, and continue using their current
294 const BoundNetLog& bound_net_log); 294 // network otherwise.
295 void MaybeMigrateOrCloseSessions(
296 NetworkChangeNotifier::NetworkHandle new_network,
297 bool force_close,
298 const BoundNetLog& bound_net_log);
295 299
296 // Method that initiates migration of |session| if |session| is 300 // Method that initiates migration of |session| if |session| is
297 // active and if there is an alternate network than the one to which 301 // active and if there is an alternate network than the one to which
298 // |session| is currently bound. If not null, |packet| is sent on 302 // |session| is currently bound. If not null, |packet| is sent on
299 // the new network, else a PING frame is sent. 303 // the new network, else a PING frame is sent.
300 void MaybeMigrateSingleSession(QuicChromiumClientSession* session, 304 void MaybeMigrateSingleSession(QuicChromiumClientSession* session,
301 MigrationCause migration_cause, 305 MigrationCause migration_cause,
302 scoped_refptr<StringIOBuffer> packet); 306 scoped_refptr<StringIOBuffer> packet);
303 307
304 // Migrates |session| over to using |network|. If |network| is 308 // Migrates |session| over to using |network|. If |network| is
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 const scoped_refptr<SSLConfigService> ssl_config_service_; 649 const scoped_refptr<SSLConfigService> ssl_config_service_;
646 650
647 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 651 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
648 652
649 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 653 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
650 }; 654 };
651 655
652 } // namespace net 656 } // namespace net
653 657
654 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 658 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/quic_stream_factory.cc » ('j') | net/quic/chromium/quic_stream_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698