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 3dd498219175ef85728ba0bc01624ef4f5c3941d..d813b6cb840ff3db891ba40dd1a0f92bb1c985a7 100644 |
| --- a/net/quic/chromium/quic_http_stream.h |
| +++ b/net/quic/chromium/quic_http_stream.h |
| @@ -134,6 +134,16 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| void ResetStream(); |
| + // If |has_response_status_| is false, sets |response_status| to the result |
| + // of ComputeResponseStatus(). Returns |response_status_|. |
| + int GetResponseStatus(); |
|
Buck
2017/03/28 21:19:57
There seem to be instances where the return value
Ryan Hamilton
2017/03/28 21:54:03
Good idea. I thought about that but couldn't decid
|
| + // Sets |response_status_| to |response_status| and sets |
| + // |has_response_status_| to true. |
| + void SetResponseStatus(int response_status); |
| + // Computes the correct response status based on the status of the handshake, |
| + // |session_error|, |connection_error| and |stream_error|. |
| + int ComputeResponseStatus() const; |
| + |
| State next_state_; |
| base::WeakPtr<QuicChromiumClientSession> session_; |
| @@ -159,6 +169,7 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| // |response_info_| is the HTTP response data object which is filled in |
| // when a the response headers are read. It is not owned by this stream. |
| HttpResponseInfo* response_info_; |
| + bool has_response_status_; // true if response_status_ as been set. |
| // Because response data is buffered, also buffer the response status if the |
| // stream is explicitly closed via OnError or OnClose with an error. |
| // Once all buffered data has been returned, this will be used as the final |
| @@ -198,7 +209,8 @@ class NET_EXPORT_PRIVATE QuicHttpStream |
| NetLogWithSource stream_net_log_; |
| - QuicErrorCode quic_connection_error_; |
| + 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_; |