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

Unified Diff: net/base/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: comments in the header 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 side-by-side diff with in-line comments
Download patch
Index: net/base/upload_data_stream.h
diff --git a/net/base/upload_data_stream.h b/net/base/upload_data_stream.h
index fbfb32fee2680576de7b79209f8d595a305f4d1d..e952444b38ac413c920ce2de40f148c2c55fe886 100644
--- a/net/base/upload_data_stream.h
+++ b/net/base/upload_data_stream.h
@@ -56,9 +56,9 @@ class NET_EXPORT UploadDataStream {
// upload data is smaller than size()), zeros are padded to ensure that
// size() bytes can be read, which can happen for TYPE_FILE payloads.
//
- // Reads are currently not allowed to fail - they must either return
- // a value >= 0 or ERR_IO_PENDING, and call OnReadCompleted with a
- // value >= 0.
+ // Reads can fail - they can either return
+ // ERR_FAILED or ERR_IO_PENDING on failures, and must call OnReadCompleted
+ // with an error value.
mmenke 2016/06/06 16:22:33 Think this should separate ERR_FAILED with ERR_IO_
maksims (do not use this acc) 2016/06/21 11:09:25 Should I remove your TODO now?
// TODO(mmenke): Investigate letting reads fail.
int Read(IOBuffer* buf, int buf_len, const CompletionCallback& callback);

Powered by Google App Engine
This is Rietveld 408576698