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..5703a4cae28e1b0b36d1c92f9c1954b81363fce1 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, and |
|
hiroshige
2015/08/11 09:35:01
What is "a suitable thread"? Isn't this a general
yhirano
2015/08/11 11:36:01
Sorry the restriction was gone.
|
| + // - No data is read yet. |
| + // After that read() / beginRead() will return |Done|. |
|
hiroshige
2015/08/11 09:35:01
Please add "and drainAsBlobDataHandle() will retur
yhirano
2015/08/11 11:36:01
I rewrote comments.
|
| + // 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 |