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

Unified Diff: Source/modules/fetch/FetchDataConsumerHandle.h

Issue 1265413002: Introduce FetchFormDataConsumerHandle. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: Source/modules/fetch/FetchDataConsumerHandle.h
diff --git a/Source/modules/fetch/FetchDataConsumerHandle.h b/Source/modules/fetch/FetchDataConsumerHandle.h
index 6f811ab5398541ab309f4cf903f72641f99b1fe8..67e90876ed61c23e614833ffcdfd3cd0b7e326e4 100644
--- a/Source/modules/fetch/FetchDataConsumerHandle.h
+++ b/Source/modules/fetch/FetchDataConsumerHandle.h
@@ -7,6 +7,7 @@
#include "modules/ModulesExport.h"
#include "platform/blob/BlobData.h"
+#include "platform/network/FormData.h"
#include "public/platform/WebDataConsumerHandle.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
@@ -40,6 +41,16 @@ public:
// function is no-op.
// This function returns |nullptr| when called during two-phase read.
virtual PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy = DisallowBlobWithInvalidSize) { return nullptr; }
+
+ // Drains the data as a FormData.
+ // This function returns a non-null form data when
+ // - The handle is made from a FormData-convertible type,
+ // - The reader is running on a suitable thread
hiroshige 2015/08/10 13:27:03 nit: append ", and" at the end of line?
yhirano 2015/08/11 06:08:43 Done.
+ // - No data is read yet.
+ // After that read() / beginRead() will return |Done|.
+ // Otherwise this function does nothing and returns null.
+ // This function returns |nullptr| when called during two-phase read.
+ virtual PassRefPtr<FormData> drainAsFormData() { return nullptr; }
};
// TODO(yhirano): obtainReader() is currently non-virtual override, and

Powered by Google App Engine
This is Rietveld 408576698