Chromium Code Reviews| Index: net/spdy/spdy_http_stream.h |
| =================================================================== |
| --- net/spdy/spdy_http_stream.h (revision 144839) |
| +++ net/spdy/spdy_http_stream.h (working copy) |
| @@ -31,7 +31,8 @@ |
| // The SpdyHttpStream is a HTTP-specific type of stream known to a SpdySession. |
| class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate, |
| - public HttpStream { |
| + public HttpStream, |
| + public ChunkCallback { |
|
Ryan Sleevi
2012/07/04 00:52:49
iwyu: You should include "net/base/upload_data.h"
ramant (doing other things)
2012/07/04 21:04:33
Done.
|
| public: |
| SpdyHttpStream(SpdySession* spdy_session, bool direct); |
| virtual ~SpdyHttpStream(); |
| @@ -83,8 +84,10 @@ |
| virtual void OnDataReceived(const char* buffer, int bytes) OVERRIDE; |
| virtual void OnDataSent(int length) OVERRIDE; |
| virtual void OnClose(int status) OVERRIDE; |
| - virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE; |
| + // ChunkCallback methods. |
| + virtual void OnChunkAvailable() OVERRIDE; |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy2Test, |
| FlowControlStallResume); |
| @@ -95,6 +98,12 @@ |
| FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy3Test, |
| FlowControlNegativeSendWindowSize); |
| + // Reads the data from the request body stream and sends the data by calling |
| + // spdy stream's WriteStreamData. In case of chunked uploads, if data is not |
|
Ryan Sleevi
2012/07/04 00:52:49
nit: spdy stream's WriteStreamData -> SpdyStream::
ramant (doing other things)
2012/07/04 21:04:33
Done.
|
| + // available, then it will indicate to OnChunkAvailable that is waiting for |
| + // chunked data by setting |waiting_for_chunk_| to true. |
|
Ryan Sleevi
2012/07/04 00:52:49
nit: Suggested rewording:
In the case of chunked
ramant (doing other things)
2012/07/04 21:04:33
Done.
|
| + int SendData(); |
| + |
| // Call the user callback. |
| void DoCallback(int rv); |
| @@ -147,6 +156,8 @@ |
| // Is this spdy stream direct to the origin server (or to a proxy). |
| bool direct_; |
| + // Is the spdy stream waiting for chunked data. |
|
Ryan Sleevi
2012/07/04 00:52:49
nit: True if the connection is stalled waiting for
ramant (doing other things)
2012/07/04 21:04:33
Done.
|
| + bool waiting_for_chunk_; |
| bool send_last_chunk_; |
| DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |