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

Unified Diff: Source/modules/fetch/FetchResponseData.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/FetchRequestData.cpp ('k') | Source/modules/fetch/FetchResponseData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/FetchResponseData.h
diff --git a/Source/modules/fetch/FetchResponseData.h b/Source/modules/fetch/FetchResponseData.h
index 463cef4947136d55f7ece5cdeb7ff6e7a41d555e..0fbffd20b9f1df7c1494341963ecd745ea4a2606 100644
--- a/Source/modules/fetch/FetchResponseData.h
+++ b/Source/modules/fetch/FetchResponseData.h
@@ -14,8 +14,8 @@
namespace blink {
-class BlobDataHandle;
class BodyStreamBuffer;
+class ExecutionContext;
class FetchHeaderList;
class WebServiceWorkerResponse;
@@ -37,33 +37,31 @@ public:
FetchResponseData* createCORSFilteredResponse();
FetchResponseData* createOpaqueFilteredResponse();
- FetchResponseData* clone();
+ FetchResponseData* clone(ExecutionContext*);
Type type() const { return m_type; }
const KURL& url() const { return m_url; }
unsigned short status() const { return m_status; }
AtomicString statusMessage() const { return m_statusMessage; }
FetchHeaderList* headerList() const { return m_headerList.get(); }
- PassRefPtr<BlobDataHandle> blobDataHandle() const { return m_blobDataHandle; }
BodyStreamBuffer* buffer() const { return m_buffer; }
String mimeType() const;
- PassRefPtr<BlobDataHandle> internalBlobDataHandle() const;
BodyStreamBuffer* internalBuffer() const;
String internalMIMEType() const;
void setURL(const KURL& url) { m_url = url; }
void setStatus(unsigned short status) { m_status = status; }
void setStatusMessage(AtomicString statusMessage) { m_statusMessage = statusMessage; }
- void setBlobDataHandle(PassRefPtr<BlobDataHandle>);
void setMIMEType(const String& type) { m_mimeType = type; }
- // If the type is Default, replaces |m_buffer| and sets |m_blobDataHandle|
- // to nullptr. If the type is Basic or CORS, replaces |m_buffer| and sets
- // |m_blobDataHandle| to nullptr, and does the same operation to
- // |m_internalResponse|. If the type is Error or Opaque, does nothing.
+ // If the type is Default, replaces |m_buffer|.
+ // If the type is Basic or CORS, replaces |m_buffer| and
+ // |m_internalResponse->m_buffer|.
+ // If the type is Error or Opaque, does nothing.
void replaceBodyStreamBuffer(BodyStreamBuffer*);
- void populateWebServiceWorkerResponse(WebServiceWorkerResponse&);
+ // Does not call response.setBlobDataHandle().
+ void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */);
DECLARE_TRACE();
@@ -76,7 +74,6 @@ private:
unsigned short m_status;
AtomicString m_statusMessage;
Member<FetchHeaderList> m_headerList;
- RefPtr<BlobDataHandle> m_blobDataHandle;
Member<FetchResponseData> m_internalResponse;
Member<BodyStreamBuffer> m_buffer;
String m_mimeType;
« no previous file with comments | « Source/modules/fetch/FetchRequestData.cpp ('k') | Source/modules/fetch/FetchResponseData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698