Index: net/spdy/spdy_http_stream.cc |
=================================================================== |
--- net/spdy/spdy_http_stream.cc (revision 144839) |
+++ net/spdy/spdy_http_stream.cc (working copy) |
@@ -187,6 +187,10 @@ |
request_body_stream_->set_chunk_callback(callback); |
} |
+bool SpdyHttpStream::IsRequestBodyChunked() { |
+ return request_body_stream_ != NULL && request_body_stream_->is_chunked(); |
+} |
+ |
int SpdyHttpStream::SendRequest(const HttpRequestHeaders& request_headers, |
scoped_ptr<UploadDataStream> request_body, |
HttpResponseInfo* response, |
@@ -271,13 +275,7 @@ |
stream_->Cancel(); |
} |
-bool SpdyHttpStream::OnSendHeadersComplete(int status) { |
- if (!callback_.is_null()) |
- DoCallback(status); |
- return request_body_stream_.get() == NULL; |
-} |
- |
-int SpdyHttpStream::OnSendBody() { |
+int SpdyHttpStream::SendBody() { |
CHECK(request_body_stream_.get()); |
// TODO(satorux): Clean up the logic here. This behavior is weird. Reading |
@@ -295,7 +293,7 @@ |
eof ? DATA_FLAG_FIN : DATA_FLAG_NONE); |
} |
-int SpdyHttpStream::OnSendBodyComplete(int status, bool* eof) { |
+int SpdyHttpStream::SendBodyComplete(int status, bool* eof) { |
// |status| is the number of bytes written to the SPDY stream. |
CHECK(request_body_stream_.get()); |
*eof = false; |
@@ -327,6 +325,28 @@ |
return OK; |
} |
+bool SpdyHttpStream::OnSendHeadersComplete(int status) { |
+ if (!callback_.is_null()) |
+ DoCallback(status); |
+ return request_body_stream_.get() == NULL; |
+} |
+ |
+int SpdyHttpStream::OnSendBody() { |
+ return SendBody(); |
+} |
+ |
+int SpdyHttpStream::OnSendBodyComplete(int status, bool* eof) { |
+ return SendBodyComplete(status, eof); |
+} |
+ |
+int SpdyHttpStream::OnSendChunkedBody() { |
+ return OnSendBody(); |
+} |
+ |
+int SpdyHttpStream::OnSendChunkedBodyComplete(int status, bool* eof) { |
+ return OnSendBodyComplete(status, eof); |
+} |
+ |
int SpdyHttpStream::OnResponseReceived(const SpdyHeaderBlock& response, |
base::Time response_time, |
int status) { |