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

Unified Diff: net/http/http_stream_parser.cc

Issue 10910268: net: Make UploadDataStream::Read() asynchronous (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 2 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
« no previous file with comments | « net/http/http_stream_parser.h ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 3f538eb954f4dd77f649a8b6f4f883526de33c20..84a160cf0a567782b141c23e94fe4c61ca095547 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -260,7 +260,7 @@ int HttpStreamParser::SendRequest(const std::string& request_line,
size_t todo = request_body_->size();
while (todo) {
- int consumed = request_body_->Read(request_headers_, todo);
+ int consumed = request_body_->ReadSync(request_headers_, todo);
DCHECK_GT(consumed, 0); // Read() won't fail if not chunked.
request_headers_->DidConsume(consumed);
todo -= consumed;
@@ -490,7 +490,7 @@ int HttpStreamParser::DoSendChunkedBody(int result) {
return OK;
}
- const int consumed = request_body_->Read(chunk_buf_, chunk_buf_->size());
+ const int consumed = request_body_->ReadSync(chunk_buf_, chunk_buf_->size());
if (consumed == 0) { // Reached the end.
DCHECK(request_body_->IsEOF());
request_body_buf_->Clear();
@@ -534,8 +534,8 @@ int HttpStreamParser::DoSendNonChunkedBody(int result) {
}
request_body_buf_->Clear();
- const int consumed = request_body_->Read(request_body_buf_,
- request_body_buf_->capacity());
+ const int consumed = request_body_->ReadSync(request_body_buf_,
+ request_body_buf_->capacity());
if (consumed == 0) { // Reached the end.
io_state_ = STATE_REQUEST_SENT;
} else if (consumed > 0) {
« no previous file with comments | « net/http/http_stream_parser.h ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698