Index: net/quic/quic_spdy_stream.h |
diff --git a/net/quic/quic_spdy_stream.h b/net/quic/quic_spdy_stream.h |
index 2d864955f0f60eef2796eba1809b2d488fed1b74..29bab655a1e76dec7301c18699b94a9037e14da6 100644 |
--- a/net/quic/quic_spdy_stream.h |
+++ b/net/quic/quic_spdy_stream.h |
@@ -20,6 +20,7 @@ |
#include "net/base/iovec.h" |
#include "net/base/ip_endpoint.h" |
#include "net/base/net_export.h" |
+#include "net/quic/quic_header_list.h" |
#include "net/quic/quic_protocol.h" |
#include "net/quic/quic_stream_sequencer.h" |
#include "net/quic/reliable_quic_stream.h" |
@@ -84,6 +85,13 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
// should be closed; no more data will be sent by the peer. |
virtual void OnStreamHeadersComplete(bool fin, size_t frame_len); |
+ // Called by the session when decompressed headers have been completely |
+ // delivered to this stream. If |fin| is true, then this stream |
+ // should be closed; no more data will be sent by the peer. |
+ virtual void OnStreamHeaderList(bool fin, |
+ size_t frame_len, |
+ const QuicHeaderList& header_list); |
+ |
// Called by the session when decompressed PUSH_PROMISE headers data |
// is received for this stream. |
// May be called multiple times, with each call providing additional headers |
@@ -95,6 +103,12 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
virtual void OnPromiseHeadersComplete(QuicStreamId promised_id, |
size_t frame_len); |
+ // Called by the session when decompressed push promise headers have |
+ // been completely delivered to this stream. |
+ virtual void OnPromiseHeaderList(QuicStreamId promised_id, |
+ size_t frame_len, |
+ const QuicHeaderList& header_list); |
+ |
// Override the base class to not discard response when receiving |
// QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. |
void OnStreamReset(const QuicRstStreamFrame& frame) override; |
@@ -121,6 +135,9 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
// Marks |bytes_consumed| of the trailers data as consumed. |
void MarkTrailersConsumed(size_t bytes_consumed); |
+ // Clears |header_list_|. |
+ void ConsumeHeaderList() { header_list_.Clear(); } |
+ |
// This block of functions wraps the sequencer's functions of the same |
// name. These methods return uncompressed data until that has |
// been fully processed. Then they simply delegate to the sequencer. |
@@ -144,6 +161,8 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
return decompressed_headers_; |
} |
+ const QuicHeaderList& header_list() const { return header_list_; } |
+ |
bool trailers_decompressed() const { return trailers_decompressed_; } |
const std::string& decompressed_trailers() const { |
@@ -166,6 +185,12 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
// trailing) headers are expected next. |
virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); |
virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); |
+ virtual void OnInitialHeadersComplete(bool fin, |
+ size_t frame_len, |
+ const QuicHeaderList& header_list); |
+ virtual void OnTrailingHeadersComplete(bool fin, |
+ size_t frame_len, |
+ const QuicHeaderList& header_list); |
QuicSpdySession* spdy_session() const { return spdy_session_; } |
Visitor* visitor() { return visitor_; } |
@@ -190,6 +215,9 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
// Contains a copy of the decompressed headers until they are consumed |
// via ProcessData or Readv. |
std::string decompressed_headers_; |
+ // Contains a copy of the decompressed header (name, value) pairs until they |
+ // are consumed via Readv. |
+ QuicHeaderList header_list_; |
// True if the trailers have been completely decompressed. |
bool trailers_decompressed_; |