Index: net/quic/quic_frame_list.h |
diff --git a/net/quic/quic_frame_list.h b/net/quic/quic_frame_list.h |
index 55ee80433d7cc103d4051f27c175d0b78d46e6f6..7491cb74d7ae5df38db755430ee78291c41d5077 100644 |
--- a/net/quic/quic_frame_list.h |
+++ b/net/quic/quic_frame_list.h |
@@ -22,10 +22,13 @@ class NET_EXPORT_PRIVATE QuicFrameList { |
public: |
// A contiguous segment received by a QUIC stream. |
struct FrameData { |
- FrameData(QuicStreamOffset offset, string segment); |
+ FrameData(QuicStreamOffset offset, |
+ string segment, |
+ const QuicTime timestamp); |
const QuicStreamOffset offset; |
string segment; |
+ const QuicTime timestamp; |
}; |
explicit QuicFrameList(); |
@@ -38,14 +41,16 @@ class NET_EXPORT_PRIVATE QuicFrameList { |
// Returns true if there is nothing to read in this buffer. |
bool Empty() const { return frame_list_.empty(); } |
- // Write the supplied data to this buffer. If the write was successful, |
- // return the number of bytes written in |bytes_written|. |
- // Return QUIC_INVALID_STREAM_DATA if |data| overlaps with existing data. |
- // No data will be written. |
- // Return QUIC_NO_ERROR, if |data| is duplicated with data written previously, |
- // and |bytes_written| = 0 |
+ // Write the supplied data to this buffer. |timestamp| is used for |
+ // measuring head of line (HOL) blocking. If the write was |
+ // successful, return the number of bytes written in |
+ // |bytes_written|. Return QUIC_INVALID_STREAM_DATA if |data| |
+ // overlaps with existing data. No data will be written. Return |
+ // QUIC_NO_ERROR, if |data| is duplicated with data written |
+ // previously, and |bytes_written| = 0 |
QuicErrorCode WriteAtOffset(QuicStreamOffset offset, |
StringPiece data, |
+ QuicTime timestamp, |
size_t* bytes_written); |
// Read from this buffer into given iovec array, upto number of iov_len iovec |
@@ -63,6 +68,12 @@ class NET_EXPORT_PRIVATE QuicFrameList { |
// iov_size of them. |
int GetReadableRegions(struct iovec* iov, int 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; |
+ |
// Called after GetReadableRegions() to accumulate total_bytes_read_ and free |
// up block when all data in it have been read out. |
// Pre-requisite: bytes_used <= ReadableBytes() |