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 "modules/fetch/FetchResponseData.h" | 5 #include "modules/fetch/FetchResponseData.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
8 #include "core/dom/DOMArrayBuffer.h" | 8 #include "core/dom/DOMArrayBuffer.h" |
9 #include "core/fetch/FetchUtils.h" | 9 #include "core/fetch/FetchUtils.h" |
10 #include "modules/fetch/BodyStreamBuffer.h" | 10 #include "modules/fetch/BodyStreamBuffer.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 if (m_internalResponse) { | 187 if (m_internalResponse) { |
188 return m_internalResponse->mimeType(); | 188 return m_internalResponse->mimeType(); |
189 } | 189 } |
190 return m_mimeType; | 190 return m_mimeType; |
191 } | 191 } |
192 | 192 |
193 void FetchResponseData::setURLList(const Vector<KURL>& urlList) { | 193 void FetchResponseData::setURLList(const Vector<KURL>& urlList) { |
194 m_urlList = urlList; | 194 m_urlList = urlList; |
195 } | 195 } |
196 | 196 |
| 197 const Vector<KURL>& FetchResponseData::internalURLList() const { |
| 198 if (m_internalResponse) { |
| 199 return m_internalResponse->m_urlList; |
| 200 } |
| 201 return m_urlList; |
| 202 } |
| 203 |
197 FetchResponseData* FetchResponseData::clone(ScriptState* scriptState) { | 204 FetchResponseData* FetchResponseData::clone(ScriptState* scriptState) { |
198 FetchResponseData* newResponse = create(); | 205 FetchResponseData* newResponse = create(); |
199 newResponse->m_type = m_type; | 206 newResponse->m_type = m_type; |
200 if (m_terminationReason) { | 207 if (m_terminationReason) { |
201 newResponse->m_terminationReason = wrapUnique(new TerminationReason); | 208 newResponse->m_terminationReason = wrapUnique(new TerminationReason); |
202 *newResponse->m_terminationReason = *m_terminationReason; | 209 *newResponse->m_terminationReason = *m_terminationReason; |
203 } | 210 } |
204 newResponse->setURLList(m_urlList); | 211 newResponse->setURLList(m_urlList); |
205 newResponse->m_status = m_status; | 212 newResponse->m_status = m_status; |
206 newResponse->m_statusMessage = m_statusMessage; | 213 newResponse->m_statusMessage = m_statusMessage; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 296 } |
290 } | 297 } |
291 | 298 |
292 DEFINE_TRACE(FetchResponseData) { | 299 DEFINE_TRACE(FetchResponseData) { |
293 visitor->trace(m_headerList); | 300 visitor->trace(m_headerList); |
294 visitor->trace(m_internalResponse); | 301 visitor->trace(m_internalResponse); |
295 visitor->trace(m_buffer); | 302 visitor->trace(m_buffer); |
296 } | 303 } |
297 | 304 |
298 } // namespace blink | 305 } // namespace blink |
OLD | NEW |