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

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

Issue 1186713009: Implement BodyStreamBuffer::create() from WebDataConsumerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: yhirano comments Created 5 years, 6 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 | Source/modules/fetch/BodyStreamBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/BodyStreamBuffer.h
diff --git a/Source/modules/fetch/BodyStreamBuffer.h b/Source/modules/fetch/BodyStreamBuffer.h
index f7d37a16f7d5640feaba7785dd73257f32a98b8f..cdb47baab116261c68167786d96f4c924f8e15d1 100644
--- a/Source/modules/fetch/BodyStreamBuffer.h
+++ b/Source/modules/fetch/BodyStreamBuffer.h
@@ -9,6 +9,7 @@
#include "modules/ModulesExport.h"
#include "platform/blob/BlobData.h"
#include "platform/heap/Heap.h"
+#include "public/platform/WebDataConsumerHandle.h"
#include "wtf/Deque.h"
#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
@@ -71,6 +72,11 @@ public:
bool isObserverRegistered() const { return m_observer.get(); }
DECLARE_TRACE();
+ // Creates a BodyStreamBuffer from |handle| as the source.
+ // On failure, BodyStreamBuffer::error() is called with a NetworkError
+ // with |failureMessage|.
+ static BodyStreamBuffer* create(PassOwnPtr<WebDataConsumerHandle> /* handle */, const String& failureMessage);
+
private:
Deque<RefPtr<DOMArrayBuffer>> m_queue;
bool m_isClosed;
« no previous file with comments | « no previous file | Source/modules/fetch/BodyStreamBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698