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

Side by Side Diff: net/base/upload_data_stream.cc

Issue 9270030: net: Don't merge HTTP headers and body if the body is not in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/upload_data_stream.h" 5 #include "net/base/upload_data_stream.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "net/base/file_stream.h" 10 #include "net/base/file_stream.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 bool UploadDataStream::IsOnLastChunk() const { 161 bool UploadDataStream::IsOnLastChunk() const {
162 const std::vector<UploadData::Element>& elements = *data_->elements(); 162 const std::vector<UploadData::Element>& elements = *data_->elements();
163 DCHECK(data_->is_chunked()); 163 DCHECK(data_->is_chunked());
164 return (eof_ || 164 return (eof_ ||
165 (!elements.empty() && 165 (!elements.empty() &&
166 next_element_ == elements.size() && 166 next_element_ == elements.size() &&
167 elements.back().is_last_chunk())); 167 elements.back().is_last_chunk()));
168 } 168 }
169 169
170 bool UploadDataStream::IsInMemory() const {
171 return data_->IsInMemory();
172 }
173
170 } // namespace net 174 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698