| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 flow_controller_.bytes_consumed(); | 472 flow_controller_.bytes_consumed(); |
| 473 AddBytesConsumed(bytes_to_consume); | 473 AddBytesConsumed(bytes_to_consume); |
| 474 } | 474 } |
| 475 | 475 |
| 476 void ReliableQuicStream::OnWindowUpdateFrame( | 476 void ReliableQuicStream::OnWindowUpdateFrame( |
| 477 const QuicWindowUpdateFrame& frame) { | 477 const QuicWindowUpdateFrame& frame) { |
| 478 if (!flow_controller_.IsEnabled()) { | 478 if (!flow_controller_.IsEnabled()) { |
| 479 DLOG(DFATAL) << "Flow control not enabled! " << version(); | 479 DLOG(DFATAL) << "Flow control not enabled! " << version(); |
| 480 return; | 480 return; |
| 481 } | 481 } |
| 482 | |
| 483 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) { | 482 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) { |
| 484 // We can write again! | 483 // We can write again! |
| 485 // TODO(rjshade): This does not respect priorities (e.g. multiple | 484 // TODO(rjshade): This does not respect priorities (e.g. multiple |
| 486 // outstanding POSTs are unblocked on arrival of | 485 // outstanding POSTs are unblocked on arrival of |
| 487 // SHLO with initial window). | 486 // SHLO with initial window). |
| 488 // As long as the connection is not flow control blocked, we can write! | 487 // As long as the connection is not flow control blocked, we can write! |
| 489 OnCanWrite(); | 488 OnCanWrite(); |
| 490 } | 489 } |
| 491 } | 490 } |
| 492 | 491 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 534 |
| 536 bool ReliableQuicStream::IsFlowControlBlocked() { | 535 bool ReliableQuicStream::IsFlowControlBlocked() { |
| 537 if (flow_controller_.IsBlocked()) { | 536 if (flow_controller_.IsBlocked()) { |
| 538 return true; | 537 return true; |
| 539 } | 538 } |
| 540 return stream_contributes_to_connection_flow_control_ && | 539 return stream_contributes_to_connection_flow_control_ && |
| 541 connection_flow_controller_->IsBlocked(); | 540 connection_flow_controller_->IsBlocked(); |
| 542 } | 541 } |
| 543 | 542 |
| 544 } // namespace net | 543 } // namespace net |
| OLD | NEW |