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_QUIC_HTTP_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_HTTP_STREAM_H_ |
6 #define NET_QUIC_QUIC_HTTP_STREAM_H_ | 6 #define NET_QUIC_QUIC_HTTP_STREAM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <list> | 11 #include <list> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
18 #include "net/base/load_timing_info.h" | |
18 #include "net/http/http_stream.h" | 19 #include "net/http/http_stream.h" |
19 #include "net/quic/chromium/quic_chromium_client_session.h" | 20 #include "net/quic/chromium/quic_chromium_client_session.h" |
20 #include "net/quic/chromium/quic_chromium_client_stream.h" | 21 #include "net/quic/chromium/quic_chromium_client_stream.h" |
21 #include "net/quic/core/quic_client_push_promise_index.h" | 22 #include "net/quic/core/quic_client_push_promise_index.h" |
22 | 23 |
23 namespace net { | 24 namespace net { |
24 | 25 |
25 namespace test { | 26 namespace test { |
26 class QuicHttpStreamPeer; | 27 class QuicHttpStreamPeer; |
27 } // namespace test | 28 } // namespace test |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 | 171 |
171 // Number of bytes received by the headers stream on behalf of this stream. | 172 // Number of bytes received by the headers stream on behalf of this stream. |
172 int64_t headers_bytes_received_; | 173 int64_t headers_bytes_received_; |
173 // Number of bytes sent by the headers stream on behalf of this stream. | 174 // Number of bytes sent by the headers stream on behalf of this stream. |
174 int64_t headers_bytes_sent_; | 175 int64_t headers_bytes_sent_; |
175 | 176 |
176 // Number of bytes received when the stream was closed. | 177 // Number of bytes received when the stream was closed. |
177 int64_t closed_stream_received_bytes_; | 178 int64_t closed_stream_received_bytes_; |
178 // Number of bytes sent when the stream was closed. | 179 // Number of bytes sent when the stream was closed. |
179 int64_t closed_stream_sent_bytes_; | 180 int64_t closed_stream_sent_bytes_; |
181 // Used to hold the stream id when stream was closed. | |
182 QuicStreamId closed_stream_id_; | |
Ryan Hamilton
2016/09/09 22:05:39
Let's store is_first, instead.
| |
180 | 183 |
181 // The caller's callback to be used for asynchronous operations. | 184 // The caller's callback to be used for asynchronous operations. |
182 CompletionCallback callback_; | 185 CompletionCallback callback_; |
183 | 186 |
184 // Caller provided buffer for the ReadResponseBody() response. | 187 // Caller provided buffer for the ReadResponseBody() response. |
185 scoped_refptr<IOBuffer> user_buffer_; | 188 scoped_refptr<IOBuffer> user_buffer_; |
186 int user_buffer_len_; | 189 int user_buffer_len_; |
187 | 190 |
188 // Temporary buffer used to read the request body from UploadDataStream. | 191 // Temporary buffer used to read the request body from UploadDataStream. |
189 scoped_refptr<IOBufferWithSize> raw_request_body_buf_; | 192 scoped_refptr<IOBufferWithSize> raw_request_body_buf_; |
(...skipping 13 matching lines...) Expand all Loading... | |
203 bool found_promise_; | 206 bool found_promise_; |
204 // |QuicClientPromisedInfo| owns this. It will be set when |Try()| | 207 // |QuicClientPromisedInfo| owns this. It will be set when |Try()| |
205 // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid | 208 // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid |
206 // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is | 209 // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is |
207 // invoked. | 210 // invoked. |
208 QuicClientPushPromiseIndex::TryHandle* push_handle_; | 211 QuicClientPushPromiseIndex::TryHandle* push_handle_; |
209 | 212 |
210 // Set to true when DoLoop() is being executed, false otherwise. | 213 // Set to true when DoLoop() is being executed, false otherwise. |
211 bool in_loop_; | 214 bool in_loop_; |
212 | 215 |
216 // Session connect timing info. | |
217 LoadTimingInfo::ConnectTiming connect_timing_; | |
218 | |
213 base::WeakPtrFactory<QuicHttpStream> weak_factory_; | 219 base::WeakPtrFactory<QuicHttpStream> weak_factory_; |
214 | 220 |
215 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); | 221 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |
216 }; | 222 }; |
217 | 223 |
218 } // namespace net | 224 } // namespace net |
219 | 225 |
220 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ | 226 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ |
OLD | NEW |