Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: net/spdy/spdy_stream.h

Issue 15555003: [SPDY] Remove SpdyStream::Delegate::OnSendBody()'s return value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove return value Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698