Chromium Code Reviews| Index: net/spdy/spdy_stream.h |
| diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h |
| index 9a055c2ab9e3cf30365770e99ec1c0a0c47fbaa7..a9cc2da48d0f59222d6f12be8f7c5f0fa4ba90c0 100644 |
| --- a/net/spdy/spdy_stream.h |
| +++ b/net/spdy/spdy_stream.h |
| @@ -16,6 +16,7 @@ |
| #include "googleurl/src/gurl.h" |
| #include "net/base/bandwidth_metrics.h" |
| #include "net/base/io_buffer.h" |
| +#include "net/base/upload_data.h" |
| #include "net/base/net_log.h" |
| #include "net/spdy/spdy_framer.h" |
| #include "net/spdy/spdy_protocol.h" |
| @@ -34,7 +35,9 @@ class SSLInfo; |
| // a SpdyNetworkTransaction) will maintain a reference to the stream. When |
| // initiated by the server, only the SpdySession will maintain any reference, |
| // until such a time as a client object requests a stream for the path. |
| -class SpdyStream : public base::RefCounted<SpdyStream> { |
| +class SpdyStream |
| + : public base::RefCounted<SpdyStream>, |
| + public ChunkCallback { |
| public: |
| // Delegate handles protocol specific behavior of spdy stream. |
| class Delegate { |
| @@ -52,7 +55,7 @@ class SpdyStream : public base::RefCounted<SpdyStream> { |
| // Called when data has been sent. |status| indicates network error |
| // or number of bytes has been sent. |
| // Returns true if no more data to be sent. |
| - virtual bool OnSendBodyComplete(int status) = 0; |
| + virtual bool OnSendBodyComplete(int* status) = 0; |
|
willchan no longer on Chromium
2011/02/01 23:35:59
Change this to be more consistent with the rest of
Satish
2011/02/22 14:25:44
Done.
|
| // Called when the SYN_STREAM, SYN_REPLY, or HEADERS frames are received. |
| // Normal streams will receive a SYN_REPLY and optional HEADERS frames. |
| @@ -73,6 +76,8 @@ class SpdyStream : public base::RefCounted<SpdyStream> { |
| // Called when SpdyStream is closed. |
| virtual void OnClose(int status) = 0; |
| + virtual void set_chunk_callback(ChunkCallback* callback) = 0; |
|
willchan no longer on Chromium
2011/02/01 23:35:59
Please comment this.
|
| + |
| protected: |
| friend class base::RefCounted<Delegate>; |
| virtual ~Delegate() {} |
| @@ -222,6 +227,9 @@ class SpdyStream : public base::RefCounted<SpdyStream> { |
| // true. |
| GURL GetUrl() const; |
| + // ChunkCallback methods. |
| + virtual void OnChunkAvailable(); |
| + |
| private: |
| enum State { |
| STATE_NONE, |