Index: net/quic/quic_stream_sequencer.h |
diff --git a/net/quic/quic_stream_sequencer.h b/net/quic/quic_stream_sequencer.h |
index a1bdd327c644b9f07450b6b034a73eb4abb3782b..c73ed47ec9e336ea6f7d8a352e0a4d03a6aab0fb 100644 |
--- a/net/quic/quic_stream_sequencer.h |
+++ b/net/quic/quic_stream_sequencer.h |
@@ -18,6 +18,7 @@ namespace test { |
class QuicStreamSequencerPeer; |
} // namespace test |
+class QuicClock; |
class QuicSession; |
class ReliableQuicStream; |
@@ -25,7 +26,7 @@ class ReliableQuicStream; |
// up to the next layer. |
class NET_EXPORT_PRIVATE QuicStreamSequencer { |
public: |
- explicit QuicStreamSequencer(ReliableQuicStream* quic_stream); |
+ QuicStreamSequencer(ReliableQuicStream* quic_stream, const QuicClock* clock); |
virtual ~QuicStreamSequencer(); |
// If the frame is the next one we need in order to process in-order data, |
@@ -42,6 +43,12 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer { |
// number of iovs used. Non-destructive of the underlying data. |
int GetReadableRegions(iovec* iov, size_t iov_len) const; |
+ // Fills in one iovec with the next readable region. |timestamp| is |
+ // data arrived at the sequencer, and is used for measuring head of |
+ // line blocking (HOL). Returns false if there is no readable |
+ // region available. |
+ bool GetReadableRegion(iovec* iov, QuicTime* timestamp) const; |
+ |
// Copies the data into the iov_len buffers provided. Returns the number of |
// bytes read. Any buffered data no longer in use will be released. |
// TODO(rch): remove this method and instead implement it as a helper method |
@@ -121,6 +128,9 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer { |
// received. |
int num_early_frames_received_; |
+ // Not owned. |
+ const QuicClock* clock_; |
+ |
DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer); |
}; |