Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // Method that migrates |session| over to using |peer_address| and |
| 300 // not null, |packet| is sent on the new network, else a PING frame | 300 // |new_network|. If not null, |packet| is sent on the new network, |
| 301 // is sent. Returns ERR_QUIC_PROTOCOL_ERROR if migration fails. | 301 // else a PING frame is sent. |
| 302 void MigrateSessionToNetwork(QuicChromiumClientSession* session, | 302 void MigrateSessionToNewSocket(QuicChromiumClientSession* session, |
| 303 NetworkChangeNotifier::NetworkHandle new_network, | 303 IPEndPoint peer_address, |
| 304 const BoundNetLog& bound_net_log, | 304 NetworkChangeNotifier::NetworkHandle network, |
|
Ryan Hamilton
2016/07/06 19:29:37
Can you document what happens when |network| is kI
Jana
2016/07/12 22:34:10
Good suggestion. Done.
| |
| 305 scoped_refptr<StringIOBuffer> packet); | 305 const BoundNetLog& bound_net_log, |
| 306 scoped_refptr<StringIOBuffer> packet); | |
| 306 | 307 |
| 307 // NetworkChangeNotifier::IPAddressObserver methods: | 308 // NetworkChangeNotifier::IPAddressObserver methods: |
| 308 | 309 |
| 309 // Until the servers support roaming, close all connections when the local | 310 // Until the servers support roaming, close all connections when the local |
| 310 // IP address changes. | 311 // IP address changes. |
| 311 void OnIPAddressChanged() override; | 312 void OnIPAddressChanged() override; |
| 312 | 313 |
| 313 // NetworkChangeNotifier::NetworkObserver methods: | 314 // NetworkChangeNotifier::NetworkObserver methods: |
| 314 void OnNetworkConnected( | 315 void OnNetworkConnected( |
| 315 NetworkChangeNotifier::NetworkHandle network) override; | 316 NetworkChangeNotifier::NetworkHandle network) override; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 600 const scoped_refptr<SSLConfigService> ssl_config_service_; | 601 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 601 | 602 |
| 602 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 603 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 603 | 604 |
| 604 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 605 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 605 }; | 606 }; |
| 606 | 607 |
| 607 } // namespace net | 608 } // namespace net |
| 608 | 609 |
| 609 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 610 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |