Chromium Code Reviews| Index: net/base/upload_data.cc |
| diff --git a/net/base/upload_data.cc b/net/base/upload_data.cc |
| index 913c172b7355bfc46d42d7cf1771bd57b3faf18d..019254e48878c431c31304373c0ef5a9bd5041e7 100644 |
| --- a/net/base/upload_data.cc |
| +++ b/net/base/upload_data.cc |
| @@ -177,6 +177,18 @@ uint64 UploadData::GetContentLength() { |
| return len; |
| } |
| +bool UploadData::IsInMemory() const { |
| + // Chunks are provided as a stream, hence it's not in memory. |
|
wtc
2012/01/24 19:08:04
Nit: this comment is not 100% accurate. Chunks ar
satorux1
2012/01/24 19:25:42
Done.
|
| + if (is_chunked_) |
|
wtc
2012/01/24 19:08:04
Question: Is this test necessary? If is_chunked_
satorux1
2012/01/24 19:25:42
I originally thought about it, but there is a case
|
| + return false; |
| + |
| + for (size_t i = 0; i < elements_.size(); ++i) { |
| + if (elements_[i].type() != TYPE_BYTES) |
| + return false; |
| + } |
| + return true; |
| +} |
| + |
| void UploadData::SetElements(const std::vector<Element>& elements) { |
| elements_ = elements; |
| } |