| Index: net/quic/quic_spdy_stream.h
|
| diff --git a/net/quic/quic_spdy_stream.h b/net/quic/quic_spdy_stream.h
|
| index 81673f7e369dd1a1edfd2c41b3a73ee8650fe094..b9d6797614cd7ad44581b1ca189d94a49ed1dccf 100644
|
| --- a/net/quic/quic_spdy_stream.h
|
| +++ b/net/quic/quic_spdy_stream.h
|
| @@ -94,6 +94,9 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream {
|
| // Marks |bytes_consumed| of the headers data as consumed.
|
| void MarkHeadersConsumed(size_t bytes_consumed);
|
|
|
| + // Marks |bytes_consumed| of the trailers data as consumed.
|
| + void MarkTrailersConsumed(size_t bytes_consumed);
|
| +
|
| // 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.
|
| @@ -113,13 +116,25 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream {
|
| return decompressed_headers_;
|
| }
|
|
|
| + bool trailers_decompressed() const { return trailers_decompressed_; }
|
| +
|
| + const std::string& decompressed_trailers() const {
|
| + return decompressed_trailers_;
|
| + }
|
| +
|
| SpdyPriority priority() const { return priority_; }
|
|
|
| protected:
|
| + // Called by OnStreamHeadersComplete depending on which type (initial or
|
| + // trailing) headers are expected next.
|
| + virtual void OnInitialHeadersComplete(bool fin, size_t frame_len);
|
| + virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len);
|
| +
|
| // Sets priority_ to priority. This should only be called before bytes are
|
| // written to the server.
|
| void set_priority(SpdyPriority priority);
|
|
|
| + // Returns true if headers have been fully read and consumed.
|
| bool FinishedReadingHeaders() const;
|
|
|
| private:
|
| @@ -127,6 +142,9 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream {
|
| friend class test::ReliableQuicStreamPeer;
|
| friend class QuicStreamUtils;
|
|
|
| + // Returns true if trailers have been fully read and consumed.
|
| + bool FinishedReadingTrailers() const;
|
| +
|
| QuicSpdySession* spdy_session_;
|
|
|
| Visitor* visitor_;
|
| @@ -138,6 +156,12 @@ class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream {
|
| // via ProcessData or Readv.
|
| std::string decompressed_headers_;
|
|
|
| + // True if the trailers have been completely decompressed.
|
| + bool trailers_decompressed_;
|
| + // Contains a copy of the decompressed trailers until they are consumed
|
| + // via ProcessData or Readv.
|
| + std::string decompressed_trailers_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream);
|
| };
|
|
|
|
|