| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/base/file_stream.h" |
| 9 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| 10 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 11 | 12 |
| 12 namespace net { | 13 namespace net { |
| 13 | 14 |
| 14 UploadDataStream* UploadDataStream::Create(UploadData* data, int* error_code) { | 15 UploadDataStream* UploadDataStream::Create(UploadData* data, int* error_code) { |
| 15 scoped_ptr<UploadDataStream> stream(new UploadDataStream(data)); | 16 scoped_ptr<UploadDataStream> stream(new UploadDataStream(data)); |
| 16 int rv = stream->FillBuf(); | 17 int rv = stream->FillBuf(); |
| 17 if (error_code) | 18 if (error_code) |
| 18 *error_code = rv; | 19 *error_code = rv; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 126 } |
| 126 } | 127 } |
| 127 | 128 |
| 128 if (next_element_ == end && !buf_len_) | 129 if (next_element_ == end && !buf_len_) |
| 129 eof_ = true; | 130 eof_ = true; |
| 130 | 131 |
| 131 return OK; | 132 return OK; |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace net | 135 } // namespace net |
| OLD | NEW |