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

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

Issue 644243002: Fix a QUIC bug where the headers stream becomes flow control blocked and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fix_a_bug_where_packet_received_times_77056400
Patch Set: Created 6 years, 2 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/reliable_quic_stream.h ('k') | no next file » | 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/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/iovector.h" 8 #include "net/quic/iovector.h"
9 #include "net/quic/quic_flow_controller.h" 9 #include "net/quic/quic_flow_controller.h"
10 #include "net/quic/quic_session.h" 10 #include "net/quic/quic_session.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 if (!read_side_closed_) { 525 if (!read_side_closed_) {
526 flow_controller_.AddBytesConsumed(bytes); 526 flow_controller_.AddBytesConsumed(bytes);
527 } 527 }
528 528
529 if (stream_contributes_to_connection_flow_control_) { 529 if (stream_contributes_to_connection_flow_control_) {
530 connection_flow_controller_->AddBytesConsumed(bytes); 530 connection_flow_controller_->AddBytesConsumed(bytes);
531 } 531 }
532 } 532 }
533 } 533 }
534 534
535 void ReliableQuicStream::UpdateSendWindowOffset(uint64 new_window) {
536 if (flow_controller_.UpdateSendWindowOffset(new_window)) {
537 OnCanWrite();
538 }
539 }
540
535 bool ReliableQuicStream::IsFlowControlBlocked() { 541 bool ReliableQuicStream::IsFlowControlBlocked() {
536 if (flow_controller_.IsBlocked()) { 542 if (flow_controller_.IsBlocked()) {
537 return true; 543 return true;
538 } 544 }
539 return stream_contributes_to_connection_flow_control_ && 545 return stream_contributes_to_connection_flow_control_ &&
540 connection_flow_controller_->IsBlocked(); 546 connection_flow_controller_->IsBlocked();
541 } 547 }
542 548
543 } // namespace net 549 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698