Index: net/quic/quic_stream_sequencer.h |
diff --git a/net/quic/quic_stream_sequencer.h b/net/quic/quic_stream_sequencer.h |
index 722305f22397185f2759831ec44d2e67f22455cd..d7ec9429b0c529ee68b135da146f77b6a0816314 100644 |
--- a/net/quic/quic_stream_sequencer.h |
+++ b/net/quic/quic_stream_sequencer.h |
@@ -78,8 +78,11 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer { |
// automatically when the FIN is consumed (which may be immediately). |
void StopReading(); |
- size_t num_bytes_buffered() const { return num_bytes_buffered_; } |
- QuicStreamOffset num_bytes_consumed() const { return num_bytes_consumed_; } |
+ // Number of bytes in the buffer right now. |
+ size_t NumBytesBuffered() const; |
+ |
+ // Number of bytes has been consumed. |
+ QuicStreamOffset NumBytesConsumed() const; |
int num_frames_received() const { return num_frames_received_; } |
@@ -105,18 +108,11 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer { |
// the stream of FIN, and clear buffers. |
bool MaybeCloseStream(); |
- // Called whenever bytes are consumed by the stream. Updates |
- // num_bytes_consumed_ and num_bytes_buffered_. |
- void RecordBytesConsumed(size_t bytes_consumed); |
- |
// The stream which owns this sequencer. |
ReliableQuicStream* stream_; |
- // The last data consumed by the stream. |
- QuicStreamOffset num_bytes_consumed_; |
- |
- // Stores buffered frames in offset order. |
- QuicFrameList buffered_frames_; |
+ // Stores received data in offset order. |
+ std::unique_ptr<QuicStreamSequencerBufferInterface> buffered_frames_; |
Ryan Hamilton
2015/10/21 16:44:52
use scoped_ptr instead of std::unique_ptr or this
|
// The offset, if any, we got a stream termination for. When this many bytes |
// have been processed, the sequencer will be closed. |
@@ -126,9 +122,6 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer { |
// buffer all new incoming data until FlushBufferedFrames is called. |
bool blocked_; |
- // Tracks how many bytes the sequencer has buffered. |
- size_t num_bytes_buffered_; |
- |
// Count of the number of frames received. |
int num_frames_received_; |