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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { | 553 void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { |
554 switch (event) { | 554 switch (event) { |
555 // TODO(satyamshekhar): Move the logic of setting the encrypter/decrypter | 555 // TODO(satyamshekhar): Move the logic of setting the encrypter/decrypter |
556 // to QuicSession since it is the glue. | 556 // to QuicSession since it is the glue. |
557 case ENCRYPTION_FIRST_ESTABLISHED: | 557 case ENCRYPTION_FIRST_ESTABLISHED: |
558 break; | 558 break; |
559 | 559 |
560 case ENCRYPTION_REESTABLISHED: | 560 case ENCRYPTION_REESTABLISHED: |
561 // Retransmit originally packets that were sent, since they can't be | 561 // Retransmit originally packets that were sent, since they can't be |
562 // decrypted by the peer. | 562 // decrypted by the peer. |
563 connection_->RetransmitUnackedPackets(INITIAL_ENCRYPTION_ONLY); | 563 connection_->RetransmitUnackedPackets(ALL_INITIAL_RETRANSMISSION); |
564 break; | 564 break; |
565 | 565 |
566 case HANDSHAKE_CONFIRMED: | 566 case HANDSHAKE_CONFIRMED: |
567 LOG_IF(DFATAL, !config_.negotiated()) << ENDPOINT | 567 LOG_IF(DFATAL, !config_.negotiated()) << ENDPOINT |
568 << "Handshake confirmed without parameter negotiation."; | 568 << "Handshake confirmed without parameter negotiation."; |
569 // Discard originally encrypted packets, since they can't be decrypted by | 569 // Discard originally encrypted packets, since they can't be decrypted by |
570 // the peer. | 570 // the peer. |
571 connection_->NeuterUnencryptedPackets(); | 571 connection_->NeuterUnencryptedPackets(); |
572 connection_->SetOverallConnectionTimeout(QuicTime::Delta::Infinite()); | 572 connection_->SetOverallConnectionTimeout(QuicTime::Delta::Infinite()); |
573 max_open_streams_ = config_.max_streams_per_connection(); | 573 max_open_streams_ = config_.max_streams_per_connection(); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 765 } |
766 for (DataStreamMap::iterator it = stream_map_.begin(); | 766 for (DataStreamMap::iterator it = stream_map_.begin(); |
767 it != stream_map_.end(); ++it) { | 767 it != stream_map_.end(); ++it) { |
768 if (version <= QUIC_VERSION_16) { | 768 if (version <= QUIC_VERSION_16) { |
769 it->second->flow_controller()->Disable(); | 769 it->second->flow_controller()->Disable(); |
770 } | 770 } |
771 } | 771 } |
772 } | 772 } |
773 | 773 |
774 } // namespace net | 774 } // namespace net |
OLD | NEW |