| 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 #include "net/quic/quic_session.h" | 5 #include "net/quic/quic_session.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "net/quic/crypto/proof_verifier.h" | 8 #include "net/quic/crypto/proof_verifier.h" |
| 9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
| 10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 return GetCryptoStream()->encryption_established(); | 462 return GetCryptoStream()->encryption_established(); |
| 463 } | 463 } |
| 464 | 464 |
| 465 bool QuicSession::IsCryptoHandshakeConfirmed() { | 465 bool QuicSession::IsCryptoHandshakeConfirmed() { |
| 466 return GetCryptoStream()->handshake_confirmed(); | 466 return GetCryptoStream()->handshake_confirmed(); |
| 467 } | 467 } |
| 468 | 468 |
| 469 void QuicSession::OnConfigNegotiated() { | 469 void QuicSession::OnConfigNegotiated() { |
| 470 connection_->SetFromConfig(config_); | 470 connection_->SetFromConfig(config_); |
| 471 QuicVersion version = connection()->version(); | 471 QuicVersion version = connection()->version(); |
| 472 if (version < QUIC_VERSION_17) { | 472 if (version <= QUIC_VERSION_16) { |
| 473 return; | 473 return; |
| 474 } | 474 } |
| 475 | 475 |
| 476 if (version <= QUIC_VERSION_19) { | 476 if (version <= QUIC_VERSION_19) { |
| 477 // QUIC_VERSION_17,18,19 don't support independent stream/session flow | 477 // QUIC_VERSION_17,18,19 don't support independent stream/session flow |
| 478 // control windows. | 478 // control windows. |
| 479 if (config_.HasReceivedInitialFlowControlWindowBytes()) { | 479 if (config_.HasReceivedInitialFlowControlWindowBytes()) { |
| 480 // Streams which were created before the SHLO was received (0-RTT | 480 // Streams which were created before the SHLO was received (0-RTT |
| 481 // requests) are now informed of the peer's initial flow control window. | 481 // requests) are now informed of the peer's initial flow control window. |
| 482 uint32 new_window = config_.ReceivedInitialFlowControlWindowBytes(); | 482 uint32 new_window = config_.ReceivedInitialFlowControlWindowBytes(); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 | 736 |
| 737 void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) { | 737 void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) { |
| 738 if (version < QUIC_VERSION_19) { | 738 if (version < QUIC_VERSION_19) { |
| 739 flow_controller_->Disable(); | 739 flow_controller_->Disable(); |
| 740 } | 740 } |
| 741 | 741 |
| 742 // Inform all streams about the negotiated version. They may have been created | 742 // Inform all streams about the negotiated version. They may have been created |
| 743 // with a different version. | 743 // with a different version. |
| 744 for (DataStreamMap::iterator it = stream_map_.begin(); | 744 for (DataStreamMap::iterator it = stream_map_.begin(); |
| 745 it != stream_map_.end(); ++it) { | 745 it != stream_map_.end(); ++it) { |
| 746 if (version < QUIC_VERSION_17) { | 746 if (version <= QUIC_VERSION_16) { |
| 747 it->second->flow_controller()->Disable(); | 747 it->second->flow_controller()->Disable(); |
| 748 } | 748 } |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 | 751 |
| 752 } // namespace net | 752 } // namespace net |
| OLD | NEW |