OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ | 5 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ |
6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ | 6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 bool IsConnectionReused() const override; | 62 bool IsConnectionReused() const override; |
63 int64_t GetTotalReceivedBytes() const override; | 63 int64_t GetTotalReceivedBytes() const override; |
64 int64_t GetTotalSentBytes() const override; | 64 int64_t GetTotalSentBytes() const override; |
65 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 65 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
66 bool GetAlternativeService( | 66 bool GetAlternativeService( |
67 AlternativeService* alternative_service) const override; | 67 AlternativeService* alternative_service) const override; |
68 void PopulateNetErrorDetails(NetErrorDetails* details) override; | 68 void PopulateNetErrorDetails(NetErrorDetails* details) override; |
69 void SetPriority(RequestPriority priority) override; | 69 void SetPriority(RequestPriority priority) override; |
70 | 70 |
71 // QuicChromiumClientStream::Delegate implementation | 71 // QuicChromiumClientStream::Delegate implementation |
72 void OnInitialHeadersAvailable(const SpdyHeaderBlock& headers, | |
73 size_t frame_len) override; | |
74 void OnDataAvailable() override; | 72 void OnDataAvailable() override; |
75 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers, | 73 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers, |
76 size_t frame_len) override; | 74 size_t frame_len) override; |
77 void OnClose() override; | 75 void OnClose() override; |
78 void OnError(int error) override; | 76 void OnError(int error) override; |
79 | 77 |
80 // QuicClientPushPromiseIndex::Delegate implementation | 78 // QuicClientPushPromiseIndex::Delegate implementation |
81 bool CheckVary(const SpdyHeaderBlock& client_request, | 79 bool CheckVary(const SpdyHeaderBlock& client_request, |
82 const SpdyHeaderBlock& promise_request, | 80 const SpdyHeaderBlock& promise_request, |
83 const SpdyHeaderBlock& promise_response) override; | 81 const SpdyHeaderBlock& promise_response) override; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 int DoRequestStream(); | 115 int DoRequestStream(); |
118 int DoRequestStreamComplete(int rv); | 116 int DoRequestStreamComplete(int rv); |
119 int DoSetRequestPriority(); | 117 int DoSetRequestPriority(); |
120 int DoSendHeaders(); | 118 int DoSendHeaders(); |
121 int DoSendHeadersComplete(int rv); | 119 int DoSendHeadersComplete(int rv); |
122 int DoReadRequestBody(); | 120 int DoReadRequestBody(); |
123 int DoReadRequestBodyComplete(int rv); | 121 int DoReadRequestBodyComplete(int rv); |
124 int DoSendBody(); | 122 int DoSendBody(); |
125 int DoSendBodyComplete(int rv); | 123 int DoSendBodyComplete(int rv); |
126 | 124 |
| 125 void OnReadResponseHeadersComplete(int rv); |
127 int ProcessResponseHeaders(const SpdyHeaderBlock& headers); | 126 int ProcessResponseHeaders(const SpdyHeaderBlock& headers); |
128 | 127 |
129 int ReadAvailableData(IOBuffer* buf, int buf_len); | 128 int ReadAvailableData(IOBuffer* buf, int buf_len); |
130 void EnterStateSendHeaders(); | 129 void EnterStateSendHeaders(); |
131 | 130 |
132 void ResetStream(); | 131 void ResetStream(); |
133 | 132 |
134 // If |has_response_status_| is false, sets |response_status| to the result | 133 // If |has_response_status_| is false, sets |response_status| to the result |
135 // of ComputeResponseStatus(). Returns |response_status_|. | 134 // of ComputeResponseStatus(). Returns |response_status_|. |
136 int GetResponseStatus(); | 135 int GetResponseStatus(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 bool has_response_status_; // true if response_status_ as been set. | 173 bool has_response_status_; // true if response_status_ as been set. |
175 // Because response data is buffered, also buffer the response status if the | 174 // Because response data is buffered, also buffer the response status if the |
176 // stream is explicitly closed via OnError or OnClose with an error. | 175 // stream is explicitly closed via OnError or OnClose with an error. |
177 // Once all buffered data has been returned, this will be used as the final | 176 // Once all buffered data has been returned, this will be used as the final |
178 // response. | 177 // response. |
179 int response_status_; | 178 int response_status_; |
180 | 179 |
181 // Serialized request headers. | 180 // Serialized request headers. |
182 SpdyHeaderBlock request_headers_; | 181 SpdyHeaderBlock request_headers_; |
183 | 182 |
| 183 SpdyHeaderBlock response_header_block_; |
184 bool response_headers_received_; | 184 bool response_headers_received_; |
185 | 185 |
186 // Number of bytes received by the headers stream on behalf of this stream. | 186 // Number of bytes received by the headers stream on behalf of this stream. |
187 int64_t headers_bytes_received_; | 187 int64_t headers_bytes_received_; |
188 // Number of bytes sent by the headers stream on behalf of this stream. | 188 // Number of bytes sent by the headers stream on behalf of this stream. |
189 int64_t headers_bytes_sent_; | 189 int64_t headers_bytes_sent_; |
190 | 190 |
191 // Number of bytes received when the stream was closed. | 191 // Number of bytes received when the stream was closed. |
192 int64_t closed_stream_received_bytes_; | 192 int64_t closed_stream_received_bytes_; |
193 // Number of bytes sent when the stream was closed. | 193 // Number of bytes sent when the stream was closed. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 LoadTimingInfo::ConnectTiming connect_timing_; | 229 LoadTimingInfo::ConnectTiming connect_timing_; |
230 | 230 |
231 base::WeakPtrFactory<QuicHttpStream> weak_factory_; | 231 base::WeakPtrFactory<QuicHttpStream> weak_factory_; |
232 | 232 |
233 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); | 233 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |
234 }; | 234 }; |
235 | 235 |
236 } // namespace net | 236 } // namespace net |
237 | 237 |
238 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ | 238 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ |
OLD | NEW |