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 // True if the stream is the first stream negotiated on the session. Set when |
| 182 // the stream was closed. If |stream_| is failed to be created, this takes on |
| 183 // the default value of false. |
| 184 bool closed_is_first_stream_; |
180 | 185 |
181 // The caller's callback to be used for asynchronous operations. | 186 // The caller's callback to be used for asynchronous operations. |
182 CompletionCallback callback_; | 187 CompletionCallback callback_; |
183 | 188 |
184 // Caller provided buffer for the ReadResponseBody() response. | 189 // Caller provided buffer for the ReadResponseBody() response. |
185 scoped_refptr<IOBuffer> user_buffer_; | 190 scoped_refptr<IOBuffer> user_buffer_; |
186 int user_buffer_len_; | 191 int user_buffer_len_; |
187 | 192 |
188 // Temporary buffer used to read the request body from UploadDataStream. | 193 // Temporary buffer used to read the request body from UploadDataStream. |
189 scoped_refptr<IOBufferWithSize> raw_request_body_buf_; | 194 scoped_refptr<IOBufferWithSize> raw_request_body_buf_; |
(...skipping 13 matching lines...) Expand all Loading... |
203 bool found_promise_; | 208 bool found_promise_; |
204 // |QuicClientPromisedInfo| owns this. It will be set when |Try()| | 209 // |QuicClientPromisedInfo| owns this. It will be set when |Try()| |
205 // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid | 210 // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid |
206 // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is | 211 // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is |
207 // invoked. | 212 // invoked. |
208 QuicClientPushPromiseIndex::TryHandle* push_handle_; | 213 QuicClientPushPromiseIndex::TryHandle* push_handle_; |
209 | 214 |
210 // Set to true when DoLoop() is being executed, false otherwise. | 215 // Set to true when DoLoop() is being executed, false otherwise. |
211 bool in_loop_; | 216 bool in_loop_; |
212 | 217 |
| 218 // Session connect timing info. |
| 219 LoadTimingInfo::ConnectTiming connect_timing_; |
| 220 |
213 base::WeakPtrFactory<QuicHttpStream> weak_factory_; | 221 base::WeakPtrFactory<QuicHttpStream> weak_factory_; |
214 | 222 |
215 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); | 223 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |
216 }; | 224 }; |
217 | 225 |
218 } // namespace net | 226 } // namespace net |
219 | 227 |
220 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ | 228 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ |
OLD | NEW |