Chromium Code Reviews| 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 |