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

Unified Diff: net/quic/quic_flow_controller.h

Issue 312553003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_flow_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_flow_controller.h
diff --git a/net/quic/quic_flow_controller.h b/net/quic/quic_flow_controller.h
index 3125b81e59c8c5a8177fac294657cbf3a57071fd..596ef1aba250df5342165527d4bf63a3287b60ec 100644
--- a/net/quic/quic_flow_controller.h
+++ b/net/quic/quic_flow_controller.h
@@ -33,11 +33,11 @@ class NET_EXPORT_PRIVATE QuicFlowController {
uint64 max_receive_window);
~QuicFlowController() {}
- // Called when bytes are received from the peer, and buffered.
- void AddBytesBuffered(uint64 bytes_buffered);
-
- // Called when bytes currently buffered locally, are removed from the buffer.
- void RemoveBytesBuffered(uint64 bytes_buffered);
+ // Called when we see a new highest received byte offset from the peer, either
+ // via a data frame or a RST.
+ // Returns true if this call changes highest_received_byte_offset_, and false
+ // in the case where |new_offset| is <= highest_received_byte_offset_.
+ bool UpdateHighestReceivedOffset(uint64 new_offset);
// Called when bytes received from the peer are consumed locally.
void AddBytesConsumed(uint64 bytes_consumed);
@@ -71,12 +71,13 @@ class NET_EXPORT_PRIVATE QuicFlowController {
// Returns true if flow control receive limits have been violated by the peer.
bool FlowControlViolation();
+ uint64 highest_received_byte_offset() const {
+ return highest_received_byte_offset_;
+ }
+
private:
friend class test::QuicFlowControllerPeer;
- // Total received bytes is the sum of bytes buffered, and bytes consumed.
- uint64 TotalReceivedBytes() const;
-
// ID of stream this flow controller belongs to. This can be 0 if this is a
// connection level flow controller.
QuicStreamId id_;
@@ -91,8 +92,9 @@ class NET_EXPORT_PRIVATE QuicFlowController {
// locally.
uint64 bytes_consumed_;
- // Tracks number of bytes received from the peer, and buffered locally.
- uint64 bytes_buffered_;
+ // The highest byte offset we have seen from the peer. This could be the
+ // highest offset in a data frame, or a final value in a RST.
+ uint64 highest_received_byte_offset_;
// Tracks number of bytes sent to the peer.
uint64 bytes_sent_;
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_flow_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698