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

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

Issue 2124753005: Implements migration of a QUIC connection to a different destination address if specified by the se… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write-error
Patch Set: Comments addressed. Created 4 years, 5 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
« no previous file with comments | « net/quic/quic_client_session_base.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 const BoundNetLog& bound_net_log); 289 const BoundNetLog& bound_net_log);
290 290
291 // Method that initiates migration of |session| if |session| is 291 // Method that initiates migration of |session| if |session| is
292 // active and if there is an alternate network than the one to which 292 // active and if there is an alternate network than the one to which
293 // |session| is currently bound. If not null, |packet| is sent on 293 // |session| is currently bound. If not null, |packet| is sent on
294 // the new network, else a PING frame is sent. 294 // the new network, else a PING frame is sent.
295 void MaybeMigrateSingleSession(QuicChromiumClientSession* session, 295 void MaybeMigrateSingleSession(QuicChromiumClientSession* session,
296 MigrationCause migration_cause, 296 MigrationCause migration_cause,
297 scoped_refptr<StringIOBuffer> packet); 297 scoped_refptr<StringIOBuffer> packet);
298 298
299 // Method that migrates |session| over to using |new_network|. If 299 // Migrates |session| over to using |network|. If |network| is
300 // not null, |packet| is sent on the new network, else a PING frame 300 // kInvalidNetworkHandle, default network is used. If |packet| is
301 // is sent. Returns ERR_QUIC_PROTOCOL_ERROR if migration fails. 301 // not null, it is sent on the new network, else a PING frame is
302 void MigrateSessionToNetwork(QuicChromiumClientSession* session, 302 // sent.
303 NetworkChangeNotifier::NetworkHandle new_network, 303 void MigrateSessionToNewNetwork(QuicChromiumClientSession* session,
304 const BoundNetLog& bound_net_log, 304 NetworkChangeNotifier::NetworkHandle network,
305 scoped_refptr<StringIOBuffer> packet); 305 const BoundNetLog& bound_net_log,
306 scoped_refptr<StringIOBuffer> packet);
Ryan Hamilton 2016/07/12 22:39:26 Looks like the only caller of this method passes i
Jana 2016/07/12 23:21:53 Done.
307
308 // Migrates |session| over to using |peer_address|. If |packet| is not null,
309 // it is sent
310 // on the new network, else a PING frame is sent.
311 void MigrateSessionToNewPeerAddress(QuicChromiumClientSession* session,
312 IPEndPoint peer_address,
313 const BoundNetLog& bound_net_log,
314 scoped_refptr<StringIOBuffer> packet);
306 315
307 // NetworkChangeNotifier::IPAddressObserver methods: 316 // NetworkChangeNotifier::IPAddressObserver methods:
308 317
309 // Until the servers support roaming, close all connections when the local 318 // Until the servers support roaming, close all connections when the local
310 // IP address changes. 319 // IP address changes.
311 void OnIPAddressChanged() override; 320 void OnIPAddressChanged() override;
312 321
313 // NetworkChangeNotifier::NetworkObserver methods: 322 // NetworkChangeNotifier::NetworkObserver methods:
314 void OnNetworkConnected( 323 void OnNetworkConnected(
315 NetworkChangeNotifier::NetworkHandle network) override; 324 NetworkChangeNotifier::NetworkHandle network) override;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 448
440 void ProcessGoingAwaySession(QuicChromiumClientSession* session, 449 void ProcessGoingAwaySession(QuicChromiumClientSession* session,
441 const QuicServerId& server_id, 450 const QuicServerId& server_id,
442 bool was_session_active); 451 bool was_session_active);
443 452
444 // Collect stats from recent connections, possibly disabling Quic. 453 // Collect stats from recent connections, possibly disabling Quic.
445 void MaybeDisableQuic(QuicChromiumClientSession* session); 454 void MaybeDisableQuic(QuicChromiumClientSession* session);
446 455
447 void MaybeDisableQuic(uint16_t port); 456 void MaybeDisableQuic(uint16_t port);
448 457
458 // Internal method that migrates |session| over to using
459 // |peer_address| and |network|. If |network| is kInvalidNetworkHandle,
460 // default network is used. If |packet| is not null, it is sent
461 // on the new network, else a PING frame is sent.
462 void MigrateSession(QuicChromiumClientSession* session,
463 IPEndPoint peer_address,
464 NetworkChangeNotifier::NetworkHandle network,
465 const BoundNetLog& bound_net_log,
466 scoped_refptr<StringIOBuffer> packet);
467
449 bool require_confirmation_; 468 bool require_confirmation_;
450 NetLog* net_log_; 469 NetLog* net_log_;
451 HostResolver* host_resolver_; 470 HostResolver* host_resolver_;
452 ClientSocketFactory* client_socket_factory_; 471 ClientSocketFactory* client_socket_factory_;
453 HttpServerProperties* http_server_properties_; 472 HttpServerProperties* http_server_properties_;
454 TransportSecurityState* transport_security_state_; 473 TransportSecurityState* transport_security_state_;
455 CTVerifier* cert_transparency_verifier_; 474 CTVerifier* cert_transparency_verifier_;
456 std::unique_ptr<QuicServerInfoFactory> quic_server_info_factory_; 475 std::unique_ptr<QuicServerInfoFactory> quic_server_info_factory_;
457 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_; 476 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_;
458 QuicRandom* random_generator_; 477 QuicRandom* random_generator_;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 const scoped_refptr<SSLConfigService> ssl_config_service_; 619 const scoped_refptr<SSLConfigService> ssl_config_service_;
601 620
602 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 621 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
603 622
604 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 623 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
605 }; 624 };
606 625
607 } // namespace net 626 } // namespace net
608 627
609 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 628 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « net/quic/quic_client_session_base.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698