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

Unified Diff: net/spdy/spdy_stream.cc

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.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 3dc00e9744f3c8902f6bda56242fee6b2d40c333..5aee9c30d6d910fd45c0c3e0cd0974b13e5bb858 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -752,7 +752,8 @@ int SpdyStream::DoLoop(int result) {
break;
case STATE_SEND_BODY:
CHECK_EQ(result, OK);
- result = DoSendBody();
+ DoSendBody();
+ result = ERR_IO_PENDING;
Ryan Hamilton 2013/05/22 03:17:30 Yeah, this looks weird to me. I think it fits our
akalin 2013/05/22 08:40:05 Done.
break;
case STATE_SEND_BODY_COMPLETE:
result = DoSendBodyComplete(result);
@@ -902,7 +903,7 @@ int SpdyStream::DoSendHeadersComplete() {
// DoSendBody is called to send the optional body for the request. This call
// will also be called as each write of a chunk of the body completes.
-int SpdyStream::DoSendBody() {
+void SpdyStream::DoSendBody() {
// If we're already in the STATE_SEND_BODY state, then we've already
// sent a portion of the body. In that case, we need to first consume
// the bytes written in the body stream. Note that the bytes written is
@@ -910,9 +911,7 @@ int SpdyStream::DoSendBody() {
// data portion, of course.
io_state_ = STATE_SEND_BODY_COMPLETE;
CHECK(delegate_);
- int status = delegate_->OnSendBody();
- CHECK(status == OK || status == ERR_IO_PENDING);
- return status;
+ delegate_->OnSendBody();
}
int SpdyStream::DoSendBodyComplete(int result) {

Powered by Google App Engine
This is Rietveld 408576698