| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_HTTP_BIDIRECTIONAL_STREAM_H_ | 5 #ifndef NET_HTTP_BIDIRECTIONAL_STREAM_H_ |
| 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_H_ | 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "net/http/bidirectional_stream_impl.h" | 14 #include "net/http/bidirectional_stream_impl.h" |
| 14 #include "net/http/http_stream_factory.h" | 15 #include "net/http/http_stream_factory.h" |
| 15 #include "net/log/net_log.h" | 16 #include "net/log/net_log.h" |
| 16 | 17 |
| 17 class GURL; | 18 class GURL; |
| 18 | 19 |
| 19 namespace net { | 20 namespace net { |
| 20 | 21 |
| 21 class HttpAuthController; | 22 class HttpAuthController; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Timer used to buffer data received in short time-spans and send a single | 196 // Timer used to buffer data received in short time-spans and send a single |
| 196 // read completion notification. | 197 // read completion notification. |
| 197 scoped_ptr<base::Timer> timer_; | 198 scoped_ptr<base::Timer> timer_; |
| 198 // HttpStreamRequest used to request a BidirectionalStreamImpl. This is NULL | 199 // HttpStreamRequest used to request a BidirectionalStreamImpl. This is NULL |
| 199 // if the request has been canceled or completed. | 200 // if the request has been canceled or completed. |
| 200 scoped_ptr<HttpStreamRequest> stream_request_; | 201 scoped_ptr<HttpStreamRequest> stream_request_; |
| 201 // The underlying BidirectioanlStreamImpl used for this stream. It is | 202 // The underlying BidirectioanlStreamImpl used for this stream. It is |
| 202 // non-NULL, if the |stream_request_| successfully finishes. | 203 // non-NULL, if the |stream_request_| successfully finishes. |
| 203 scoped_ptr<BidirectionalStreamImpl> stream_impl_; | 204 scoped_ptr<BidirectionalStreamImpl> stream_impl_; |
| 204 | 205 |
| 206 // Buffer used for reading. |
| 207 scoped_refptr<IOBuffer> read_buffer_; |
| 208 // Buffer used for writing. |
| 209 scoped_refptr<IOBuffer> write_buffer_; |
| 210 // Length of |write_buffer_|. |
| 211 size_t write_buffer_len_; |
| 212 |
| 205 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); | 213 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); |
| 206 }; | 214 }; |
| 207 | 215 |
| 208 } // namespace net | 216 } // namespace net |
| 209 | 217 |
| 210 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_H_ | 218 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_H_ |
| OLD | NEW |