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