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

Side by Side Diff: net/base/elements_upload_data_stream.h

Issue 2030353002: UploadDataStream now returns errors on failures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Matt's comments, rebasing + fixed unittests Created 4 years, 6 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
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 #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
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 // True if an error occurred during read operation.
mmenke 2016/06/21 21:13:14 This comment needs to be updated.
maksims (do not use this acc) 2016/06/22 15:10:32 Done.
81 bool read_failed_; 81 int read_failed_;
mmenke 2016/06/21 21:13:14 read_error_, maybe?
maksims (do not use this acc) 2016/06/22 15:10:32 Done.
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_
OLDNEW
« no previous file with comments | « no previous file | net/base/elements_upload_data_stream.cc » ('j') | net/base/elements_upload_data_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698