| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |