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_ack_listener_interface.h" | 9 #include "net/quic/quic_ack_listener_interface.h" |
10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 // TODO(rjshade): This does not respect priorities (e.g. multiple | 414 // TODO(rjshade): This does not respect priorities (e.g. multiple |
415 // outstanding POSTs are unblocked on arrival of | 415 // outstanding POSTs are unblocked on arrival of |
416 // SHLO with initial window). | 416 // SHLO with initial window). |
417 // As long as the connection is not flow control blocked, write on! | 417 // As long as the connection is not flow control blocked, write on! |
418 OnCanWrite(); | 418 OnCanWrite(); |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 bool ReliableQuicStream::MaybeIncreaseHighestReceivedOffset( | 422 bool ReliableQuicStream::MaybeIncreaseHighestReceivedOffset( |
423 QuicStreamOffset new_offset) { | 423 QuicStreamOffset new_offset) { |
424 uint64 increment = | 424 uint64_t increment = |
425 new_offset - flow_controller_.highest_received_byte_offset(); | 425 new_offset - flow_controller_.highest_received_byte_offset(); |
426 if (!flow_controller_.UpdateHighestReceivedOffset(new_offset)) { | 426 if (!flow_controller_.UpdateHighestReceivedOffset(new_offset)) { |
427 return false; | 427 return false; |
428 } | 428 } |
429 | 429 |
430 // If |new_offset| increased the stream flow controller's highest received | 430 // If |new_offset| increased the stream flow controller's highest received |
431 // offset, increase the connection flow controller's value by the incremental | 431 // offset, increase the connection flow controller's value by the incremental |
432 // difference. | 432 // difference. |
433 if (stream_contributes_to_connection_flow_control_) { | 433 if (stream_contributes_to_connection_flow_control_) { |
434 connection_flow_controller_->UpdateHighestReceivedOffset( | 434 connection_flow_controller_->UpdateHighestReceivedOffset( |
(...skipping 21 matching lines...) Expand all Loading... |
456 } | 456 } |
457 } | 457 } |
458 | 458 |
459 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { | 459 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { |
460 if (flow_controller_.UpdateSendWindowOffset(new_window)) { | 460 if (flow_controller_.UpdateSendWindowOffset(new_window)) { |
461 OnCanWrite(); | 461 OnCanWrite(); |
462 } | 462 } |
463 } | 463 } |
464 | 464 |
465 } // namespace net | 465 } // namespace net |
OLD | NEW |