Index: net/quic/quic_headers_stream.h |
diff --git a/net/quic/quic_headers_stream.h b/net/quic/quic_headers_stream.h |
index 385650e985d6969b5b92b6322c12bd3898fabbe7..bee753d5a3f6d64852b424495c6fb559b2e4f4af 100644 |
--- a/net/quic/quic_headers_stream.h |
+++ b/net/quic/quic_headers_stream.h |
@@ -18,9 +18,10 @@ namespace net { |
class QuicSpdySession; |
-// Headers in QUIC are sent as HTTP/2 HEADERS frames over a reserved reliable |
-// stream with the id 3. Each endpoint (client and server) will allocate an |
-// instance of QuicHeadersStream to send and receive headers. |
+// Headers in QUIC are sent as HTTP/2 HEADERS or PUSH_PROMISE frames |
+// over a reserved reliable stream with the id 3. Each endpoint |
+// (client and server) will allocate an instance of QuicHeadersStream |
+// to send and receive headers. |
class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { |
public: |
explicit QuicHeadersStream(QuicSpdySession* session); |
@@ -47,6 +48,8 @@ class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { |
void OnDataAvailable() override; |
SpdyPriority Priority() const override; |
+ bool supports_push_promise() { return supports_push_promise_; } |
+ |
private: |
class SpdyFramerVisitor; |
@@ -58,6 +61,11 @@ class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { |
SpdyPriority priority, |
bool fin); |
+ // Called when a PUSH_PROMISE frame has been received. |
+ void OnPushPromise(SpdyStreamId stream_id, |
+ SpdyStreamId promised_stream_id, |
+ bool end); |
+ |
// Called when a chunk of header data is available. This is called |
// after OnHeaders. |
// |stream_id| The stream receiving the header data. |
@@ -78,11 +86,13 @@ class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { |
// Data about the stream whose headers are being processed. |
QuicStreamId stream_id_; |
+ QuicStreamId promised_stream_id_; |
bool fin_; |
size_t frame_len_; |
- // Helper variable that caches the corresponding feature flag. |
+ // Helper variables that cache the corresponding feature flag. |
bool measure_headers_hol_blocking_time_; |
+ bool supports_push_promise_; |
// Timestamps used to measure HOL blocking, these are recorded by |
// the sequencer approximate to the time of arrival off the wire. |