Chromium Code Reviews| Index: net/spdy/spdy_stream.h |
| diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h |
| index 8ead4e6686b075dc546bdad1cf3b695efb0fbe76..f012edd36c88e9538fe1655762d5f0f15726581e 100644 |
| --- a/net/spdy/spdy_stream.h |
| +++ b/net/spdy/spdy_stream.h |
| @@ -60,10 +60,16 @@ class NET_EXPORT_PRIVATE SpdyStream { |
| // Returns true if no more data to be sent after SYN frame. |
| virtual SpdySendStatus OnSendHeadersComplete() = 0; |
| - // Called when stream is ready to send data. |
| - // Returns network error code. OK when it successfully sent data. |
| - // ERR_IO_PENDING when performing operation asynchronously. |
| - virtual int OnSendBody() = 0; |
| + // Called when the stream is ready to send body data. The |
| + // delegate must call QueueStreamData() on the stream, either |
| + // immediately or asynchronously (e.g., if the data to be send has |
| + // to be read asynchronously). Must return ERR_IO_PENDING. |
|
Ryan Hamilton
2013/05/22 03:17:30
Looks like it's now void
akalin
2013/05/22 08:40:05
Done.
|
| + // |
| + // Called only when OnSendHeadersComplete() or |
| + // OnSendBodyComplete() returns MORE_DATA_TO_SEND. |
| + // |
| + // TODO(akalin): Remove the return value. |
|
Ryan Hamilton
2013/05/22 03:17:30
I think you removed the return value, didn't you?
akalin
2013/05/22 08:40:05
Done.
|
| + virtual void OnSendBody() = 0; |
| // Called when body data has been sent. |bytes_sent| is the number |
| // of bytes that has been sent (may be zero). Must return whether |
| @@ -363,7 +369,7 @@ class NET_EXPORT_PRIVATE SpdyStream { |
| int DoSendDomainBoundCertComplete(int result); |
| int DoSendHeaders(); |
| int DoSendHeadersComplete(); |
| - int DoSendBody(); |
| + void DoSendBody(); |
|
Ryan Hamilton
2013/05/22 03:17:30
I don't think this is a good idea. The pattern we
akalin
2013/05/22 08:40:05
Done.
|
| int DoSendBodyComplete(int result); |
| int DoReadHeaders(); |
| int DoReadHeadersComplete(int result); |