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/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 Loading... |
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 |
OLD | NEW |