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

Unified Diff: net/spdy/spdy_http_stream.cc

Issue 10689034: SPDY - chunked upload - speech recognition doesn't work with SPDY/3 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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_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) {

Powered by Google App Engine
This is Rietveld 408576698