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

Unified Diff: third_party/WebKit/Source/modules/fetch/BytesConsumer.h

Issue 2319033002: Add WARN_UNUSED_RESULT to BytesConsumer read methods. (Closed)
Patch Set: rebase Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/fetch/BytesConsumer.h
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumer.h b/third_party/WebKit/Source/modules/fetch/BytesConsumer.h
index c2be7729cb3272dd2376a68999936b814e281a05..7388ba53c10fb222b5e77c45c5def36826c9b26f 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumer.h
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumer.h
@@ -9,6 +9,7 @@
#include "platform/blob/BlobData.h"
#include "platform/heap/Handle.h"
#include "platform/network/EncodedFormData.h"
+#include "wtf/Compiler.h"
#include "wtf/PassRefPtr.h"
#include "wtf/text/WTFString.h"
@@ -82,7 +83,7 @@ public:
// Returns Error when errored.
// |buffer| can be null if |size| is 0.
// |*readSize| will be set to 0 if not readable.
- virtual Result read(char* buffer, size_t /* size */, size_t* readSize);
+ virtual Result read(char* buffer, size_t /* size */, size_t* readSize) WARN_UNUSED_RESULT;
// Begins a two-phase read. On success, the function stores a buffer
// that contains the read data of length |*available| into |*buffer|.
@@ -98,10 +99,10 @@ public:
//
// |*buffer| will be set to null and |*available| will be set to 0 if not
// readable.
- virtual Result beginRead(const char** buffer, size_t* available) = 0;
+ virtual Result beginRead(const char** buffer, size_t* available) WARN_UNUSED_RESULT = 0;
// Ends a two-phase read.
- virtual Result endRead(size_t readSize) = 0;
+ virtual Result endRead(size_t readSize) WARN_UNUSED_RESULT = 0;
// Drains the data as a BlobDataHandle.
// When this function returns a non-null value, the returned blob handle
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698