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

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

Issue 787793002: [ServiceWorker] Add contentType argument to BodyStreamBuffer::readAllAndCreateBlobHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/serviceworkers/BodyStreamBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/BodyStreamBuffer.h
diff --git a/Source/modules/serviceworkers/BodyStreamBuffer.h b/Source/modules/serviceworkers/BodyStreamBuffer.h
index 25a2fe2d99bfbc7ad4ebeb3f87d945281f28fa5c..d652fe91ff2985d55d342f377bc1c832dd29eee4 100644
--- a/Source/modules/serviceworkers/BodyStreamBuffer.h
+++ b/Source/modules/serviceworkers/BodyStreamBuffer.h
@@ -10,6 +10,7 @@
#include "platform/heap/Heap.h"
#include "wtf/Deque.h"
#include "wtf/RefPtr.h"
+#include "wtf/text/WTFString.h"
namespace blink {
@@ -32,13 +33,14 @@ public:
virtual void didFail(PassRefPtrWillBeRawPtr<DOMException>) = 0;
virtual void trace(Visitor*) { }
};
- BodyStreamBuffer();
+ explicit BodyStreamBuffer(const String& contentType);
yhirano 2014/12/11 03:44:18 The specified content type takes effect only when
horo 2014/12/11 04:48:56 Done.
~BodyStreamBuffer() { }
PassRefPtr<DOMArrayBuffer> read();
bool isClosed() const { return m_isClosed; }
bool hasError() const { return m_exception; }
PassRefPtrWillBeRawPtr<DOMException> exception() const { return m_exception; }
+ const String contentType() const { return m_contentType; }
// Can't call after close() or error() was called.
void write(PassRefPtr<DOMArrayBuffer>);
@@ -59,6 +61,7 @@ public:
private:
Deque<RefPtr<DOMArrayBuffer> > m_queue;
+ const String m_contentType;
bool m_isClosed;
RefPtrWillBeMember<DOMException> m_exception;
Member<Observer> m_observer;
« no previous file with comments | « no previous file | Source/modules/serviceworkers/BodyStreamBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698