OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "modules/fetch/BodyStreamBuffer.h" | 6 #include "modules/fetch/BodyStreamBuffer.h" |
7 | 7 |
8 #include "core/dom/DOMArrayBuffer.h" | 8 #include "core/dom/DOMArrayBuffer.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 void BodyStreamBuffer::close() | 156 void BodyStreamBuffer::close() |
157 { | 157 { |
158 ASSERT(!m_isClosed); | 158 ASSERT(!m_isClosed); |
159 ASSERT(!m_exception); | 159 ASSERT(!m_exception); |
160 m_isClosed = true; | 160 m_isClosed = true; |
161 if (m_observer) | 161 if (m_observer) |
162 m_observer->onClose(); | 162 m_observer->onClose(); |
163 } | 163 } |
164 | 164 |
165 void BodyStreamBuffer::error(PassRefPtrWillBeRawPtr<DOMException> exception) | 165 void BodyStreamBuffer::error(DOMException* exception) |
166 { | 166 { |
167 ASSERT(exception); | 167 ASSERT(exception); |
168 ASSERT(!m_isClosed); | 168 ASSERT(!m_isClosed); |
169 ASSERT(!m_exception); | 169 ASSERT(!m_exception); |
170 m_exception = exception; | 170 m_exception = exception; |
171 if (m_observer) | 171 if (m_observer) |
172 m_observer->onError(); | 172 m_observer->onError(); |
173 } | 173 } |
174 | 174 |
175 bool BodyStreamBuffer::readAllAndCreateBlobHandle(const String& contentType, Blo
bHandleCreatorClient* client) | 175 bool BodyStreamBuffer::readAllAndCreateBlobHandle(const String& contentType, Blo
bHandleCreatorClient* client) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 visitor->trace(m_canceller); | 211 visitor->trace(m_canceller); |
212 } | 212 } |
213 | 213 |
214 BodyStreamBuffer::BodyStreamBuffer(Canceller* canceller) | 214 BodyStreamBuffer::BodyStreamBuffer(Canceller* canceller) |
215 : m_isClosed(false) | 215 : m_isClosed(false) |
216 , m_canceller(canceller) | 216 , m_canceller(canceller) |
217 { | 217 { |
218 } | 218 } |
219 | 219 |
220 } // namespace blink | 220 } // namespace blink |
OLD | NEW |