Index: net/quic/reliable_quic_stream.h |
diff --git a/net/quic/reliable_quic_stream.h b/net/quic/reliable_quic_stream.h |
index 9d8fe888fc2343050f11fbace7f0490fdd6e34d8..0774c93bad67f32ed17c4e9366ecc5a8f6925bbb 100644 |
--- a/net/quic/reliable_quic_stream.h |
+++ b/net/quic/reliable_quic_stream.h |
@@ -113,6 +113,14 @@ class NET_EXPORT_PRIVATE ReliableQuicStream { |
// control window or the connection flow control window. |
bool IsFlowControlBlocked(); |
+ // Returns true if we have received either a RST or a FIN - either of which |
+ // gives a definitive number of bytes which the peer has sent. If this is not |
+ // true on stream termination the session must keep track of the stream's byte |
+ // offset until a definitive final value arrives. |
+ bool HasFinalReceivedByteOffset() const { |
+ return fin_received_ || rst_received_; |
+ } |
+ |
protected: |
// Sends as much of 'data' to the connection as the connection will consume, |
// and then buffers any remaining data in queued_data_. |
@@ -199,10 +207,17 @@ class NET_EXPORT_PRIVATE ReliableQuicStream { |
bool fin_buffered_; |
bool fin_sent_; |
+ // True if this stream has received (and the sequencer has accepted) a |
+ // StreamFrame with the FIN set. |
+ bool fin_received_; |
+ |
// In combination with fin_sent_, used to ensure that a FIN and/or a RST is |
// always sent before stream termination. |
bool rst_sent_; |
+ // True if this stream has received a RST stream frame. |
+ bool rst_received_; |
+ |
// True if the session this stream is running under is a server session. |
bool is_server_; |