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

Unified Diff: Source/modules/fetch/FetchBlobDataConsumerHandle.cpp

Issue 1265413002: Introduce FetchFormDataConsumerHandle. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add (const void*, size_t) creation function 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/FetchBlobDataConsumerHandle.cpp
diff --git a/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp b/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
index 9005fb551944f0fc283f8c371eaa5be99f5a03fb..27ef84237f77002d6036e6a7f0876cbbc568c9aa 100644
--- a/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
+++ b/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
@@ -390,6 +390,16 @@ public:
return blobDataHandle.release();
}
+ PassRefPtr<FormData> drainAsFormData() override
+ {
+ RefPtr<BlobDataHandle> handle = drainAsBlobDataHandle(AllowBlobWithInvalidSize);
+ if (!handle)
+ return nullptr;
+ RefPtr<FormData> formData = FormData::create();
+ formData->appendBlob(handle->uuid(), handle);
+ return formData.release();
+ }
+
private:
RefPtr<ReaderContext> m_readerContext;
OwnPtr<WebDataConsumerHandle::Reader> m_reader;

Powered by Google App Engine
This is Rietveld 408576698