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/base/upload_data_stream.cc

Issue 10861036: net: Remove UploadElement::TYPE_CHUNK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused UploadElement::set_type() Created 8 years, 4 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/base/upload_data.cc ('k') | net/base/upload_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_data_stream.cc
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc
index d0f6ca75bec4ec454ab9e180c7614b0265a85f68..239053f2785106e553f9991b72e50c93c46224af 100644
--- a/net/base/upload_data_stream.cc
+++ b/net/base/upload_data_stream.cc
@@ -81,7 +81,7 @@ int UploadDataStream::Read(IOBuffer* buf, int buf_len) {
buf_len - bytes_copied);
if (element.BytesRemaining() == 0)
- ++element_index_;
+ ++element_index_;
if (is_chunked() && !merge_chunks_)
break;
@@ -99,12 +99,9 @@ bool UploadDataStream::IsEOF() const {
// Check if all elements are consumed.
if (element_index_ == elements.size()) {
- // If the upload data is chunked, check if the last element is the
- // last chunk.
- if (!upload_data_->is_chunked() ||
- (!elements.empty() && elements.back().is_last_chunk())) {
+ // If the upload data is chunked, check if the last chunk is appended.
+ if (!upload_data_->is_chunked() || upload_data_->last_chunk_appended())
return true;
- }
}
return false;
}
« no previous file with comments | « net/base/upload_data.cc ('k') | net/base/upload_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698