OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SPDY_SPDY_HTTP_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ |
6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ | 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 14 matching lines...) Expand all Loading... |
25 class HttpResponseInfo; | 25 class HttpResponseInfo; |
26 class IOBuffer; | 26 class IOBuffer; |
27 class SpdySession; | 27 class SpdySession; |
28 class UploadData; | 28 class UploadData; |
29 class UploadDataStream; | 29 class UploadDataStream; |
30 | 30 |
31 // The SpdyHttpStream is a HTTP-specific type of stream known to a SpdySession. | 31 // The SpdyHttpStream is a HTTP-specific type of stream known to a SpdySession. |
32 class SpdyHttpStream : public SpdyStream::Delegate, public HttpStream { | 32 class SpdyHttpStream : public SpdyStream::Delegate, public HttpStream { |
33 public: | 33 public: |
34 // SpdyHttpStream constructor | 34 // SpdyHttpStream constructor |
35 explicit SpdyHttpStream(SpdySession* spdy_session); | 35 SpdyHttpStream(SpdySession* spdy_session, bool direct); |
36 virtual ~SpdyHttpStream(); | 36 virtual ~SpdyHttpStream(); |
37 | 37 |
38 SpdyStream* stream() { return stream_.get(); } | 38 SpdyStream* stream() { return stream_.get(); } |
39 | 39 |
40 // =================================================== | 40 // =================================================== |
41 // HttpStream methods: | 41 // HttpStream methods: |
42 | 42 |
43 // Initialize stream. Must be called before calling SendRequest(). | 43 // Initialize stream. Must be called before calling SendRequest(). |
44 virtual int InitializeStream(const HttpRequestInfo* request_info, | 44 virtual int InitializeStream(const HttpRequestInfo* request_info, |
45 const BoundNetLog& net_log, | 45 const BoundNetLog& net_log, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // User provided buffer for the ReadResponseBody() response. | 167 // User provided buffer for the ReadResponseBody() response. |
168 scoped_refptr<IOBuffer> user_buffer_; | 168 scoped_refptr<IOBuffer> user_buffer_; |
169 int user_buffer_len_; | 169 int user_buffer_len_; |
170 | 170 |
171 // Is there a scheduled read callback pending. | 171 // Is there a scheduled read callback pending. |
172 bool buffered_read_callback_pending_; | 172 bool buffered_read_callback_pending_; |
173 // Has more data been received from the network during the wait for the | 173 // Has more data been received from the network during the wait for the |
174 // scheduled read callback. | 174 // scheduled read callback. |
175 bool more_read_data_pending_; | 175 bool more_read_data_pending_; |
176 | 176 |
| 177 // Is this spdy stream direct to the origin server (or to a proxy). |
| 178 bool direct_; |
| 179 |
177 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 180 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
178 }; | 181 }; |
179 | 182 |
180 } // namespace net | 183 } // namespace net |
181 | 184 |
182 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 185 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
OLD | NEW |