Chromium Code Reviews| 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; |