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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual bool CanFindEndOfResponse() const; | 62 virtual bool CanFindEndOfResponse() const; |
63 virtual bool IsMoreDataBuffered() const; | 63 virtual bool IsMoreDataBuffered() const; |
64 virtual bool IsConnectionReused() const; | 64 virtual bool IsConnectionReused() const; |
65 virtual void SetConnectionReused(); | 65 virtual void SetConnectionReused(); |
66 virtual void GetSSLInfo(SSLInfo* ssl_info); | 66 virtual void GetSSLInfo(SSLInfo* ssl_info); |
67 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); | 67 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); |
68 | 68 |
69 // SpdyStream::Delegate methods: | 69 // SpdyStream::Delegate methods: |
70 virtual bool OnSendHeadersComplete(int status); | 70 virtual bool OnSendHeadersComplete(int status); |
71 virtual int OnSendBody(); | 71 virtual int OnSendBody(); |
72 virtual bool OnSendBodyComplete(int status); | 72 virtual int OnSendBodyComplete(int status, bool* eof); |
73 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 73 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
74 base::Time response_time, | 74 base::Time response_time, |
75 int status); | 75 int status); |
76 virtual void OnDataReceived(const char* buffer, int bytes); | 76 virtual void OnDataReceived(const char* buffer, int bytes); |
77 virtual void OnDataSent(int length); | 77 virtual void OnDataSent(int length); |
78 virtual void OnClose(int status); | 78 virtual void OnClose(int status); |
| 79 virtual void set_chunk_callback(ChunkCallback* callback); |
79 | 80 |
80 private: | 81 private: |
81 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); | 82 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); |
82 | 83 |
83 // Call the user callback. | 84 // Call the user callback. |
84 void DoCallback(int rv); | 85 void DoCallback(int rv); |
85 | 86 |
86 void ScheduleBufferedReadCallback(); | 87 void ScheduleBufferedReadCallback(); |
87 | 88 |
88 // Returns true if the callback is invoked. | 89 // Returns true if the callback is invoked. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 121 |
121 // Is there a scheduled read callback pending. | 122 // Is there a scheduled read callback pending. |
122 bool buffered_read_callback_pending_; | 123 bool buffered_read_callback_pending_; |
123 // Has more data been received from the network during the wait for the | 124 // Has more data been received from the network during the wait for the |
124 // scheduled read callback. | 125 // scheduled read callback. |
125 bool more_read_data_pending_; | 126 bool more_read_data_pending_; |
126 | 127 |
127 // Is this spdy stream direct to the origin server (or to a proxy). | 128 // Is this spdy stream direct to the origin server (or to a proxy). |
128 bool direct_; | 129 bool direct_; |
129 | 130 |
| 131 bool send_last_chunk_; |
| 132 |
130 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 133 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace net | 136 } // namespace net |
134 | 137 |
135 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 138 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
OLD | NEW |