| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ | 5 #ifndef NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ |
| 6 #define NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ | 6 #define NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 const BidirectionalStreamRequestInfo* request_info_; | 89 const BidirectionalStreamRequestInfo* request_info_; |
| 90 BidirectionalStreamImpl::Delegate* delegate_; | 90 BidirectionalStreamImpl::Delegate* delegate_; |
| 91 // Saves the response status if the stream is explicitly closed via OnError | 91 // Saves the response status if the stream is explicitly closed via OnError |
| 92 // or OnClose with an error. Once all buffered data has been returned, this | 92 // or OnClose with an error. Once all buffered data has been returned, this |
| 93 // will be used as the final response. | 93 // will be used as the final response. |
| 94 int response_status_; | 94 int response_status_; |
| 95 | 95 |
| 96 // The protocol that is negotiated. | 96 // The protocol that is negotiated. |
| 97 NextProto negotiated_protocol_; | 97 NextProto negotiated_protocol_; |
| 98 // Connect timing information for this stream. Populated when headers are |
| 99 // received. |
| 100 LoadTimingInfo::ConnectTiming connect_timing_; |
| 101 |
| 98 // User provided read buffer for ReadData() response. | 102 // User provided read buffer for ReadData() response. |
| 99 scoped_refptr<IOBuffer> read_buffer_; | 103 scoped_refptr<IOBuffer> read_buffer_; |
| 100 int read_buffer_len_; | 104 int read_buffer_len_; |
| 101 | 105 |
| 102 // Number of bytes received by the headers stream on behalf of this stream. | 106 // Number of bytes received by the headers stream on behalf of this stream. |
| 103 int64_t headers_bytes_received_; | 107 int64_t headers_bytes_received_; |
| 104 // Number of bytes sent by the headers stream on behalf of this stream. | 108 // Number of bytes sent by the headers stream on behalf of this stream. |
| 105 int64_t headers_bytes_sent_; | 109 int64_t headers_bytes_sent_; |
| 106 // After |stream_| has been closed, this keeps track of the total number of | 110 // After |stream_| has been closed, this keeps track of the total number of |
| 107 // bytes received over the network for |stream_| while it was open. | 111 // bytes received over the network for |stream_| while it was open. |
| 108 int64_t closed_stream_received_bytes_; | 112 int64_t closed_stream_received_bytes_; |
| 109 // After |stream_| has been closed, this keeps track of the total number of | 113 // After |stream_| has been closed, this keeps track of the total number of |
| 110 // bytes sent over the network for |stream_| while it was open. | 114 // bytes sent over the network for |stream_| while it was open. |
| 111 int64_t closed_stream_sent_bytes_; | 115 int64_t closed_stream_sent_bytes_; |
| 116 // True if the stream is the first stream negotiated on the session. Set when |
| 117 // the stream was closed. If |stream_| is failed to be created, this takes on |
| 118 // the default value of false. |
| 119 bool closed_is_first_stream_; |
| 112 // Indicates whether initial headers have been sent. | 120 // Indicates whether initial headers have been sent. |
| 113 bool has_sent_headers_; | 121 bool has_sent_headers_; |
| 114 // Indicates whether initial headers have been received. | 122 // Indicates whether initial headers have been received. |
| 115 bool has_received_headers_; | 123 bool has_received_headers_; |
| 116 | 124 |
| 117 // Whether to automatically send request headers when stream is negotiated. | 125 // Whether to automatically send request headers when stream is negotiated. |
| 118 // If false, headers will not be sent until SendRequestHeaders() is called or | 126 // If false, headers will not be sent until SendRequestHeaders() is called or |
| 119 // until next SendData/SendvData, during which QUIC will try to combine header | 127 // until next SendData/SendvData, during which QUIC will try to combine header |
| 120 // frame with data frame in the same packet if possible. | 128 // frame with data frame in the same packet if possible. |
| 121 bool send_request_headers_automatically_; | 129 bool send_request_headers_automatically_; |
| 122 | 130 |
| 123 // True of this stream is waiting for the QUIC handshake to be confirmed | 131 // True of this stream is waiting for the QUIC handshake to be confirmed |
| 124 // before sending headers. | 132 // before sending headers. |
| 125 bool waiting_for_confirmation_; | 133 bool waiting_for_confirmation_; |
| 126 | 134 |
| 127 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; | 135 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; |
| 128 | 136 |
| 129 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); | 137 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); |
| 130 }; | 138 }; |
| 131 | 139 |
| 132 } // namespace net | 140 } // namespace net |
| 133 | 141 |
| 134 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ | 142 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ |
| OLD | NEW |