| 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 #ifndef NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_ | 5 #ifndef NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_ |
| 6 #define NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_ | 6 #define NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void ProcessReadResult(const scoped_refptr<DrainableIOBuffer>& buf, | 70 void ProcessReadResult(const scoped_refptr<DrainableIOBuffer>& buf, |
| 71 int result); | 71 int result); |
| 72 | 72 |
| 73 std::vector<std::unique_ptr<UploadElementReader>> element_readers_; | 73 std::vector<std::unique_ptr<UploadElementReader>> element_readers_; |
| 74 | 74 |
| 75 // Index of the current upload element (i.e. the element currently being | 75 // Index of the current upload element (i.e. the element currently being |
| 76 // read). The index is used as a cursor to iterate over elements in | 76 // read). The index is used as a cursor to iterate over elements in |
| 77 // |upload_data_|. | 77 // |upload_data_|. |
| 78 size_t element_index_; | 78 size_t element_index_; |
| 79 | 79 |
| 80 // True if an error occcured during read operation. | 80 // Set to actual error if read fails, otherwise set to net::OK. |
| 81 bool read_failed_; | 81 int read_error_; |
| 82 | 82 |
| 83 base::WeakPtrFactory<ElementsUploadDataStream> weak_ptr_factory_; | 83 base::WeakPtrFactory<ElementsUploadDataStream> weak_ptr_factory_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(ElementsUploadDataStream); | 85 DISALLOW_COPY_AND_ASSIGN(ElementsUploadDataStream); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace net | 88 } // namespace net |
| 89 | 89 |
| 90 #endif // NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_ | 90 #endif // NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_ |
| OLD | NEW |