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

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

Issue 136523005: Use the right priority when marking QUIC streams write blocked via (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for quic_reliable_client_stream_test Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_reliable_client_stream_test.cc ('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_headers_stream.h" 10 #include "net/quic/quic_headers_stream.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 return id <= largest_peer_created_stream_id_ && 581 return id <= largest_peer_created_stream_id_ &&
582 implicitly_created_streams_.count(id) == 0; 582 implicitly_created_streams_.count(id) == 0;
583 } 583 }
584 584
585 size_t QuicSession::GetNumOpenStreams() const { 585 size_t QuicSession::GetNumOpenStreams() const {
586 return stream_map_.size() + implicitly_created_streams_.size() - 586 return stream_map_.size() + implicitly_created_streams_.size() -
587 zombie_streams_.size(); 587 zombie_streams_.size();
588 } 588 }
589 589
590 void QuicSession::MarkWriteBlocked(QuicStreamId id, QuicPriority priority) { 590 void QuicSession::MarkWriteBlocked(QuicStreamId id, QuicPriority priority) {
591 #ifndef NDEBUG
592 ReliableQuicStream* stream = GetStream(id);
593 if (stream != NULL) {
594 LOG_IF(DFATAL, priority != stream->EffectivePriority())
595 << "Priorities do not match. Got: " << priority
596 << " Expected: " << stream->EffectivePriority();
597 } else {
598 LOG(DFATAL) << "Marking unknown stream " << id << " blocked.";
599 }
600 #endif
601
591 if (id == kCryptoStreamId) { 602 if (id == kCryptoStreamId) {
592 DCHECK(!has_pending_handshake_); 603 DCHECK(!has_pending_handshake_);
593 has_pending_handshake_ = true; 604 has_pending_handshake_ = true;
594 // TODO(jar): Be sure to use the highest priority for the crypto stream, 605 // TODO(jar): Be sure to use the highest priority for the crypto stream,
595 // perhaps by adding a "special" priority for it that is higher than 606 // perhaps by adding a "special" priority for it that is higher than
596 // kHighestPriority. 607 // kHighestPriority.
597 priority = kHighestPriority; 608 priority = kHighestPriority;
598 } 609 }
599 write_blocked_streams_.PushBack(id, priority); 610 write_blocked_streams_.PushBack(id, priority);
600 } 611 }
(...skipping 13 matching lines...) Expand all
614 NOTIMPLEMENTED(); 625 NOTIMPLEMENTED();
615 return false; 626 return false;
616 } 627 }
617 628
618 void QuicSession::PostProcessAfterData() { 629 void QuicSession::PostProcessAfterData() {
619 STLDeleteElements(&closed_streams_); 630 STLDeleteElements(&closed_streams_);
620 closed_streams_.clear(); 631 closed_streams_.clear();
621 } 632 }
622 633
623 } // namespace net 634 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_reliable_client_stream_test.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698