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