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

Unified Diff: net/spdy/spdy_stream_test_util.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_test_util.cc
diff --git a/net/spdy/spdy_stream_test_util.cc b/net/spdy/spdy_stream_test_util.cc
index 76597ab2a33527febb3f2bfad4d9c888feccf218..d9c494d0f3e350573b53ceb051f255ad6737ca57 100644
--- a/net/spdy/spdy_stream_test_util.cc
+++ b/net/spdy/spdy_stream_test_util.cc
@@ -24,8 +24,8 @@ SpdySendStatus ClosingDelegate::OnSendHeadersComplete() {
return NO_MORE_DATA_TO_SEND;
}
-int ClosingDelegate::OnSendBody() {
- return OK;
+void ClosingDelegate::OnSendBody() {
+ ADD_FAILURE() << "OnSendBody should not be called";
}
SpdySendStatus ClosingDelegate::OnSendBodyComplete(size_t /*bytes_sent*/) {
@@ -131,9 +131,10 @@ StreamDelegateDoNothing::StreamDelegateDoNothing(
StreamDelegateDoNothing::~StreamDelegateDoNothing() {
}
-int StreamDelegateDoNothing::OnSendBody() {
- return OK;
+void StreamDelegateDoNothing::OnSendBody() {
+ ADD_FAILURE() << "OnSendBody should not be called";
}
+
SpdySendStatus StreamDelegateDoNothing::OnSendBodyComplete(
size_t /*bytes_sent*/) {
return NO_MORE_DATA_TO_SEND;
@@ -150,10 +151,10 @@ StreamDelegateSendImmediate::StreamDelegateSendImmediate(
StreamDelegateSendImmediate::~StreamDelegateSendImmediate() {
}
-int StreamDelegateSendImmediate::OnSendBody() {
+void StreamDelegateSendImmediate::OnSendBody() {
ADD_FAILURE() << "OnSendBody should not be called";
- return ERR_UNEXPECTED;
}
+
SpdySendStatus StreamDelegateSendImmediate::OnSendBodyComplete(
size_t /*bytes_sent*/) {
ADD_FAILURE() << "OnSendBodyComplete should not be called";
@@ -187,10 +188,9 @@ StreamDelegateWithBody::StreamDelegateWithBody(
StreamDelegateWithBody::~StreamDelegateWithBody() {
}
-int StreamDelegateWithBody::OnSendBody() {
+void StreamDelegateWithBody::OnSendBody() {
stream()->QueueStreamData(buf_.get(), buf_->BytesRemaining(),
DATA_FLAG_NONE);
- return ERR_IO_PENDING;
}
SpdySendStatus StreamDelegateWithBody::OnSendBodyComplete(size_t bytes_sent) {

Powered by Google App Engine
This is Rietveld 408576698