| 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_flow_controller.h" | 10 #include "net/quic/quic_flow_controller.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 // streams. | 648 // streams. |
| 649 return id <= largest_peer_created_stream_id_ && | 649 return id <= largest_peer_created_stream_id_ && |
| 650 !ContainsKey(implicitly_created_streams_, id); | 650 !ContainsKey(implicitly_created_streams_, id); |
| 651 } | 651 } |
| 652 | 652 |
| 653 size_t QuicSession::GetNumOpenStreams() const { | 653 size_t QuicSession::GetNumOpenStreams() const { |
| 654 return dynamic_stream_map_.size() + implicitly_created_streams_.size() - | 654 return dynamic_stream_map_.size() + implicitly_created_streams_.size() - |
| 655 draining_streams_.size(); | 655 draining_streams_.size(); |
| 656 } | 656 } |
| 657 | 657 |
| 658 void QuicSession::MarkWriteBlocked(QuicStreamId id, QuicPriority priority) { | 658 void QuicSession::MarkConnectionLevelWriteBlocked(QuicStreamId id, |
| 659 QuicPriority priority) { |
| 659 #ifndef NDEBUG | 660 #ifndef NDEBUG |
| 660 ReliableQuicStream* stream = GetStream(id); | 661 ReliableQuicStream* stream = GetStream(id); |
| 661 if (stream != nullptr) { | 662 if (stream != nullptr) { |
| 662 LOG_IF(DFATAL, priority != stream->EffectivePriority()) | 663 LOG_IF(DFATAL, priority != stream->EffectivePriority()) |
| 663 << ENDPOINT << "Stream " << id | 664 << ENDPOINT << "Stream " << id |
| 664 << "Priorities do not match. Got: " << priority | 665 << "Priorities do not match. Got: " << priority |
| 665 << " Expected: " << stream->EffectivePriority(); | 666 << " Expected: " << stream->EffectivePriority(); |
| 666 } else { | 667 } else { |
| 667 LOG(DFATAL) << "Marking unknown stream " << id << " blocked."; | 668 LOG(DFATAL) << "Marking unknown stream " << id << " blocked."; |
| 668 } | 669 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 } | 708 } |
| 708 for (auto const& kv : dynamic_stream_map_) { | 709 for (auto const& kv : dynamic_stream_map_) { |
| 709 if (kv.second->flow_controller()->IsBlocked()) { | 710 if (kv.second->flow_controller()->IsBlocked()) { |
| 710 return true; | 711 return true; |
| 711 } | 712 } |
| 712 } | 713 } |
| 713 return false; | 714 return false; |
| 714 } | 715 } |
| 715 | 716 |
| 716 } // namespace net | 717 } // namespace net |
| OLD | NEW |