Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: net/quic/quic_session.cc

Issue 1227353005: Cleanup changes: Rename QuicSession::MarkWriteBlocked to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698