Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: net/quic/quic_headers_stream.h

Issue 1572013002: relnote: QUIC header streams support to receive PUSH_PROMISE. Protected by --quic_supports_push_pr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@14_CL_111507546
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698