Chromium Code Reviews| Index: net/quic/chromium/quic_http_stream.h |
| diff --git a/net/quic/chromium/quic_http_stream.h b/net/quic/chromium/quic_http_stream.h |
| index 84bbeb972e0b3d3e73716e3c44ec277de8c14815..83d07763c7891537ea151e65731439d17ec8a4f0 100644 |
| --- a/net/quic/chromium/quic_http_stream.h |
| +++ b/net/quic/chromium/quic_http_stream.h |
| @@ -36,12 +36,11 @@ class QuicHttpStreamPeer; |
| // non-owning pointer to a QuicChromiumClientStream which it uses to |
| // send and receive data. |
| class NET_EXPORT_PRIVATE QuicHttpStream |
| - : public QuicChromiumClientSession::Observer, |
| - public QuicChromiumClientStream::Delegate, |
| + : public QuicChromiumClientStream::Delegate, |
| public QuicClientPushPromiseIndex::Delegate, |
| public MultiplexedHttpStream { |
| public: |
| - QuicHttpStream(const base::WeakPtr<QuicChromiumClientSession>& session, |
| + QuicHttpStream(std::unique_ptr<QuicChromiumClientSession::Handle> session, |
| HttpServerProperties* http_server_properties); |
| ~QuicHttpStream() override; |
| @@ -76,11 +75,6 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| void OnClose() override; |
| void OnError(int error) override; |
| - // QuicChromiumClientSession::Observer implementation |
| - void OnCryptoHandshakeConfirmed() override; |
| - void OnSuccessfulVersionNegotiation(const QuicVersion& version) override; |
| - void OnSessionClosed(int error, bool port_migration_detected) override; |
| - |
| // QuicClientPushPromiseIndex::Delegate implementation |
| bool CheckVary(const SpdyHeaderBlock& client_request, |
| const SpdyHeaderBlock& promise_request, |
| @@ -144,17 +138,18 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| // |session_error|, |connection_error| and |stream_error|. |
| int ComputeResponseStatus() const; |
| - State next_state_; |
| + QuicChromiumClientSession::Handle* quic_session() { |
| + return static_cast<QuicChromiumClientSession::Handle*>(session()); |
| + } |
| - base::WeakPtr<QuicChromiumClientSession> session_; |
| - const QuicServerId server_id_; // The ID of the QUIC server for this stream. |
| + const QuicChromiumClientSession::Handle* quic_session() const { |
|
xunjieli
2017/05/05 14:10:01
We have two versions of accessors? Can we get rid
Ryan Hamilton
2017/05/05 17:32:47
Can't get rid of either because we need the const
|
| + return static_cast<const QuicChromiumClientSession::Handle*>(session()); |
| + } |
| + |
| + State next_state_; |
| HttpServerProperties* http_server_properties_; // Unowned. |
| - QuicVersion quic_version_; |
| - int session_error_; // Error code from the connection shutdown. |
| - bool was_handshake_confirmed_; // True if the crypto handshake succeeded. |
| - std::unique_ptr<QuicChromiumClientSession::StreamRequest> stream_request_; |
| QuicChromiumClientStream* stream_; // Non-owning. |
| // The following three fields are all owned by the caller and must |
| @@ -213,12 +208,10 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| NetLogWithSource stream_net_log_; |
| + int session_error_; // Error code from the connection shutdown. |
| QuicErrorCode quic_connection_error_; // Cached connection error code. |
| QuicRstStreamErrorCode quic_stream_error_; // Cached stream error code. |
| - // True when this stream receives a go away from server due to port migration. |
| - bool port_migration_detected_; |
| - |
| bool found_promise_; |
| // |QuicClientPromisedInfo| owns this. It will be set when |Try()| |
| // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid |