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

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: Reflect comments. 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
Index: Source/modules/fetch/FetchResponseData.h
diff --git a/Source/modules/fetch/FetchResponseData.h b/Source/modules/fetch/FetchResponseData.h
index 463cef4947136d55f7ece5cdeb7ff6e7a41d555e..be7703748ecb61f1e1c5d249b9d56cc0fcb2370f 100644
--- a/Source/modules/fetch/FetchResponseData.h
+++ b/Source/modules/fetch/FetchResponseData.h
@@ -16,6 +16,7 @@ namespace blink {
class BlobDataHandle;
yhirano 2015/07/06 03:25:39 We don't need this declaration.
hiroshige 2015/07/06 05:47:07 Done.
class BodyStreamBuffer;
+class ExecutionContext;
class FetchHeaderList;
class WebServiceWorkerResponse;
@@ -37,33 +38,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 +75,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;

Powered by Google App Engine
This is Rietveld 408576698