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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 | 749 |
750 bool QuicSession::GetSSLInfo(SSLInfo* ssl_info) const { | 750 bool QuicSession::GetSSLInfo(SSLInfo* ssl_info) const { |
751 NOTIMPLEMENTED(); | 751 NOTIMPLEMENTED(); |
752 return false; | 752 return false; |
753 } | 753 } |
754 | 754 |
755 void QuicSession::PostProcessAfterData() { | 755 void QuicSession::PostProcessAfterData() { |
756 STLDeleteElements(&closed_streams_); | 756 STLDeleteElements(&closed_streams_); |
757 closed_streams_.clear(); | 757 closed_streams_.clear(); |
758 | 758 |
759 if (FLAGS_close_quic_connection_unfinished_streams_2 && | 759 if (connection()->connected() && |
760 connection()->connected() && | |
761 locally_closed_streams_highest_offset_.size() > max_open_streams_) { | 760 locally_closed_streams_highest_offset_.size() > max_open_streams_) { |
762 // A buggy client may fail to send FIN/RSTs. Don't tolerate this. | 761 // A buggy client may fail to send FIN/RSTs. Don't tolerate this. |
763 connection_->SendConnectionClose(QUIC_TOO_MANY_UNFINISHED_STREAMS); | 762 connection_->SendConnectionClose(QUIC_TOO_MANY_UNFINISHED_STREAMS); |
764 } | 763 } |
765 } | 764 } |
766 | 765 |
767 void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) { | 766 void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) { |
768 // Disable stream level flow control based on negotiated version. Streams may | 767 // Disable stream level flow control based on negotiated version. Streams may |
769 // have been created with a different version. | 768 // have been created with a different version. |
770 if (version < QUIC_VERSION_21) { | 769 if (version < QUIC_VERSION_21) { |
(...skipping 14 matching lines...) Expand all Loading... |
785 for (DataStreamMap::iterator it = stream_map_.begin(); | 784 for (DataStreamMap::iterator it = stream_map_.begin(); |
786 it != stream_map_.end(); ++it) { | 785 it != stream_map_.end(); ++it) { |
787 if (it->second->flow_controller()->IsBlocked()) { | 786 if (it->second->flow_controller()->IsBlocked()) { |
788 return true; | 787 return true; |
789 } | 788 } |
790 } | 789 } |
791 return false; | 790 return false; |
792 } | 791 } |
793 | 792 |
794 } // namespace net | 793 } // namespace net |
OLD | NEW |