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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 731 |
732 size_t QuicSession::GetNumAvailableStreams() const { | 732 size_t QuicSession::GetNumAvailableStreams() const { |
733 return available_streams_.size(); | 733 return available_streams_.size(); |
734 } | 734 } |
735 | 735 |
736 void QuicSession::MarkConnectionLevelWriteBlocked(QuicStreamId id, | 736 void QuicSession::MarkConnectionLevelWriteBlocked(QuicStreamId id, |
737 QuicPriority priority) { | 737 QuicPriority priority) { |
738 #ifndef NDEBUG | 738 #ifndef NDEBUG |
739 ReliableQuicStream* stream = GetStream(id); | 739 ReliableQuicStream* stream = GetStream(id); |
740 if (stream != nullptr) { | 740 if (stream != nullptr) { |
741 LOG_IF(DFATAL, priority != stream->EffectivePriority()) | 741 LOG_IF(DFATAL, priority != stream->Priority()) |
742 << ENDPOINT << "Stream " << id | 742 << ENDPOINT << "Stream " << id |
743 << "Priorities do not match. Got: " << priority | 743 << "Priorities do not match. Got: " << priority |
744 << " Expected: " << stream->EffectivePriority(); | 744 << " Expected: " << stream->Priority(); |
745 } else { | 745 } else { |
746 LOG(DFATAL) << "Marking unknown stream " << id << " blocked."; | 746 LOG(DFATAL) << "Marking unknown stream " << id << " blocked."; |
747 } | 747 } |
748 #endif | 748 #endif |
749 | 749 |
750 if (id == kCryptoStreamId) { | 750 if (id == kCryptoStreamId) { |
751 DCHECK(!has_pending_handshake_); | 751 DCHECK(!has_pending_handshake_); |
752 has_pending_handshake_ = true; | 752 has_pending_handshake_ = true; |
753 // TODO(jar): Be sure to use the highest priority for the crypto stream, | 753 // TODO(jar): Be sure to use the highest priority for the crypto stream, |
754 // perhaps by adding a "special" priority for it that is higher than | 754 // perhaps by adding a "special" priority for it that is higher than |
(...skipping 26 matching lines...) Expand all Loading... |
781 } | 781 } |
782 for (auto const& kv : dynamic_stream_map_) { | 782 for (auto const& kv : dynamic_stream_map_) { |
783 if (kv.second->flow_controller()->IsBlocked()) { | 783 if (kv.second->flow_controller()->IsBlocked()) { |
784 return true; | 784 return true; |
785 } | 785 } |
786 } | 786 } |
787 return false; | 787 return false; |
788 } | 788 } |
789 | 789 |
790 } // namespace net | 790 } // namespace net |
OLD | NEW |