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

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

Issue 1192913007: Change BodyStreamBuffer to be FetchDataConsumerHandle-based and enable backpressure in Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 5 years, 5 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 | « Source/modules/fetch/FetchManager.cpp ('k') | Source/modules/fetch/FetchRequestData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/FetchRequestData.h
diff --git a/Source/modules/fetch/FetchRequestData.h b/Source/modules/fetch/FetchRequestData.h
index 788ba4fd4efaaa8fb266e657e36264e2fa98fc49..f9accec1f42ac8aa7f2d6e46e241bb3c90a07d14 100644
--- a/Source/modules/fetch/FetchRequestData.h
+++ b/Source/modules/fetch/FetchRequestData.h
@@ -17,7 +17,8 @@
namespace blink {
-class BlobDataHandle;
+class BodyStreamBuffer;
+class ExecutionContext;
class FetchHeaderList;
class SecurityOrigin;
class WebServiceWorkerRequest;
@@ -56,9 +57,10 @@ public:
};
static FetchRequestData* create();
- static FetchRequestData* create(const WebServiceWorkerRequest&);
- FetchRequestData* clone() const;
- FetchRequestData* pass() const;
+ static FetchRequestData* create(ExecutionContext*, const WebServiceWorkerRequest&);
+ // Call Request::refreshBody() after calling clone() or pass().
+ FetchRequestData* clone(ExecutionContext*);
+ FetchRequestData* pass(ExecutionContext*);
~FetchRequestData();
void setMethod(AtomicString method) { m_method = method; }
@@ -83,8 +85,9 @@ public:
Tainting tainting() const { return m_responseTainting; }
FetchHeaderList* headerList() const { return m_headerList.get(); }
void setHeaderList(FetchHeaderList* headerList) { m_headerList = headerList; }
- PassRefPtr<BlobDataHandle> blobDataHandle() const { return m_blobDataHandle; }
- void setBlobDataHandle(PassRefPtr<BlobDataHandle> blobHandle) { m_blobDataHandle = blobHandle; }
+ BodyStreamBuffer* buffer() const { return m_buffer; }
+ // Call Request::refreshBody() after calling setBuffer().
+ void setBuffer(BodyStreamBuffer* buffer) { m_buffer = buffer; }
String mimeType() const { return m_mimeType; }
void setMIMEType(const String& type) { m_mimeType = type; }
@@ -96,7 +99,6 @@ private:
AtomicString m_method;
KURL m_url;
Member<FetchHeaderList> m_headerList;
- RefPtr<BlobDataHandle> m_blobDataHandle;
bool m_unsafeRequestFlag;
// FIXME: Support m_skipServiceWorkerFlag;
WebURLRequest::RequestContext m_context;
@@ -112,6 +114,7 @@ private:
// FIXME: Support m_manualRedirectFlag;
// FIXME: Support m_redirectCount;
Tainting m_responseTainting;
+ Member<BodyStreamBuffer> m_buffer;
String m_mimeType;
};
« no previous file with comments | « Source/modules/fetch/FetchManager.cpp ('k') | Source/modules/fetch/FetchRequestData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698