Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: net/quic/chromium/quic_http_stream.h

Issue 2900533002: Add an async ReadTrailers method to QuicChromiumClientStream::Handle (Closed)
Patch Set: Fix comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers,
73 size_t frame_len) override;
74 void OnClose() override; 72 void OnClose() override;
75 void OnError(int error) override; 73 void OnError(int error) override;
76 74
77 // QuicClientPushPromiseIndex::Delegate implementation 75 // QuicClientPushPromiseIndex::Delegate implementation
78 bool CheckVary(const SpdyHeaderBlock& client_request, 76 bool CheckVary(const SpdyHeaderBlock& client_request,
79 const SpdyHeaderBlock& promise_request, 77 const SpdyHeaderBlock& promise_request,
80 const SpdyHeaderBlock& promise_response) override; 78 const SpdyHeaderBlock& promise_response) override;
81 // TODO(rch): QuicClientPushPromiseIndex::Delegate is part of shared code. 79 // TODO(rch): QuicClientPushPromiseIndex::Delegate is part of shared code.
82 // Figure out how to make the QuicHttpStream receive a Handle in this 80 // Figure out how to make the QuicHttpStream receive a Handle in this
83 // case instead of a QuicSpdyStream. 81 // case instead of a QuicSpdyStream.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 int DoSetRequestPriority(); 114 int DoSetRequestPriority();
117 int DoSendHeaders(); 115 int DoSendHeaders();
118 int DoSendHeadersComplete(int rv); 116 int DoSendHeadersComplete(int rv);
119 int DoReadRequestBody(); 117 int DoReadRequestBody();
120 int DoReadRequestBodyComplete(int rv); 118 int DoReadRequestBodyComplete(int rv);
121 int DoSendBody(); 119 int DoSendBody();
122 int DoSendBodyComplete(int rv); 120 int DoSendBodyComplete(int rv);
123 121
124 void OnReadResponseHeadersComplete(int rv); 122 void OnReadResponseHeadersComplete(int rv);
125 int ProcessResponseHeaders(const SpdyHeaderBlock& headers); 123 int ProcessResponseHeaders(const SpdyHeaderBlock& headers);
124 void ReadTrailingHeaders();
125 void OnReadTrailingHeadersComplete(int rv);
126 126
127 void OnReadBodyComplete(int rv); 127 void OnReadBodyComplete(int rv);
128 int HandleReadComplete(int rv); 128 int HandleReadComplete(int rv);
129 129
130 void EnterStateSendHeaders(); 130 void EnterStateSendHeaders();
131 131
132 void ResetStream(); 132 void ResetStream();
133 133
134 // If |has_response_status_| is false, sets |response_status| to the result 134 // If |has_response_status_| is false, sets |response_status| to the result
135 // of ComputeResponseStatus(). Returns |response_status_|. 135 // of ComputeResponseStatus(). Returns |response_status_|.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Once all buffered data has been returned, this will be used as the final 177 // Once all buffered data has been returned, this will be used as the final
178 // response. 178 // response.
179 int response_status_; 179 int response_status_;
180 180
181 // Serialized request headers. 181 // Serialized request headers.
182 SpdyHeaderBlock request_headers_; 182 SpdyHeaderBlock request_headers_;
183 183
184 SpdyHeaderBlock response_header_block_; 184 SpdyHeaderBlock response_header_block_;
185 bool response_headers_received_; 185 bool response_headers_received_;
186 186
187 SpdyHeaderBlock trailing_header_block_;
188 bool trailing_headers_received_;
189
187 // Number of bytes received by the headers stream on behalf of this stream. 190 // Number of bytes received by the headers stream on behalf of this stream.
188 int64_t headers_bytes_received_; 191 int64_t headers_bytes_received_;
189 // Number of bytes sent by the headers stream on behalf of this stream. 192 // Number of bytes sent by the headers stream on behalf of this stream.
190 int64_t headers_bytes_sent_; 193 int64_t headers_bytes_sent_;
191 194
192 // Number of bytes received when the stream was closed. 195 // Number of bytes received when the stream was closed.
193 int64_t closed_stream_received_bytes_; 196 int64_t closed_stream_received_bytes_;
194 // Number of bytes sent when the stream was closed. 197 // Number of bytes sent when the stream was closed.
195 int64_t closed_stream_sent_bytes_; 198 int64_t closed_stream_sent_bytes_;
196 // True if the stream is the first stream negotiated on the session. Set when 199 // True if the stream is the first stream negotiated on the session. Set when
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 LoadTimingInfo::ConnectTiming connect_timing_; 233 LoadTimingInfo::ConnectTiming connect_timing_;
231 234
232 base::WeakPtrFactory<QuicHttpStream> weak_factory_; 235 base::WeakPtrFactory<QuicHttpStream> weak_factory_;
233 236
234 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); 237 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream);
235 }; 238 };
236 239
237 } // namespace net 240 } // namespace net
238 241
239 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 242 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream_test.cc ('k') | net/quic/chromium/quic_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698