Chromium Code Reviews| Index: net/quic/quic_http_stream.h |
| diff --git a/net/quic/quic_http_stream.h b/net/quic/quic_http_stream.h |
| index 751729cc97915ab1cc63d0c19c9126868cd2edd4..2d54607f8c5c9a0dc8c45aca255ef95a82e9315b 100644 |
| --- a/net/quic/quic_http_stream.h |
| +++ b/net/quic/quic_http_stream.h |
| @@ -16,6 +16,7 @@ |
| #include "net/http/http_stream.h" |
| #include "net/quic/quic_chromium_client_session.h" |
| #include "net/quic/quic_chromium_client_stream.h" |
| +#include "net/quic/quic_client_push_promise_index.h" |
| namespace net { |
| @@ -29,6 +30,7 @@ class QuicHttpStreamPeer; |
| class NET_EXPORT_PRIVATE QuicHttpStream |
| : public QuicChromiumClientSession::Observer, |
| public QuicChromiumClientStream::Delegate, |
| + public QuicClientPushPromiseIndex::Delegate, |
| public HttpStream { |
| public: |
| explicit QuicHttpStream( |
| @@ -79,11 +81,18 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| void OnCryptoHandshakeConfirmed() override; |
| void OnSessionClosed(int error) override; |
| + // QuicClientPushPromiseIndex::Delegate implementation |
| + bool CheckVary(const SpdyHeaderBlock& client_request, |
| + const SpdyHeaderBlock& promise_request, |
| + const SpdyHeaderBlock& promise_response) override; |
| + void OnRendezvousResult(QuicSpdyStream* stream) override; |
| + |
| private: |
| friend class test::QuicHttpStreamPeer; |
| enum State { |
| STATE_NONE, |
| + STATE_STREAM_REQUEST, |
|
Ryan Hamilton
2016/02/24 00:34:00
Perhaps this should be STATE_REQUEST_STREAM to be
Buck
2016/02/26 23:54:16
Done.
|
| STATE_SEND_HEADERS, |
| STATE_SEND_HEADERS_COMPLETE, |
| STATE_READ_REQUEST_BODY, |
| @@ -98,6 +107,7 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| void DoCallback(int rv); |
| int DoLoop(int); |
| + int DoStreamRequest(); |
| int DoSendHeaders(); |
| int DoSendHeadersComplete(int rv); |
| int DoReadRequestBody(); |
| @@ -110,9 +120,15 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| int ProcessResponseHeaders(const SpdyHeaderBlock& headers); |
| int ReadAvailableData(IOBuffer* buf, int buf_len); |
| + void EnterStateSendHeaders(); |
| + int HandlePromise(); |
| void ResetStream(); |
| + void ConvertHeaderBlockToHttpRequestHeaders( |
| + const SpdyHeaderBlock& spdy_headers, |
| + HttpRequestHeaders* http_headers); |
|
Ryan Hamilton
2016/02/24 00:34:00
Consider adding this method to:
net/spdy/spdy_htt
Buck
2016/02/26 23:54:16
Done.
|
| + |
| State next_state_; |
| base::WeakPtr<QuicChromiumClientSession> session_; |
| @@ -181,6 +197,9 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| // TODO(rtenneti): Temporary until crbug.com/585591 is solved. |
| bool read_in_progress_ = false; |
| + bool found_promise_; |
| + QuicClientPushPromiseIndex::TryHandle* push_handle_; |
|
Ryan Hamilton
2016/02/24 00:34:00
Can you comment on ownership of this object, and u
Buck
2016/02/26 23:54:16
Done.
|
| + |
| base::WeakPtrFactory<QuicHttpStream> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |