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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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"
11 #include "modules/fetch/DataConsumerHandleUtil.h" 11 #include "modules/fetch/DataConsumerHandleUtil.h"
12 #include "modules/fetch/FetchHeaderList.h" 12 #include "modules/fetch/FetchHeaderList.h"
13 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" 13 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
14 #include "wtf/PtrUtil.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 namespace { 18 namespace {
18 19
19 WebServiceWorkerResponseType fetchTypeToWebType(FetchResponseData::Type fetchTyp e) 20 WebServiceWorkerResponseType fetchTypeToWebType(FetchResponseData::Type fetchTyp e)
20 { 21 {
21 WebServiceWorkerResponseType webType = WebServiceWorkerResponseTypeDefault; 22 WebServiceWorkerResponseType webType = WebServiceWorkerResponseTypeDefault;
22 switch (fetchType) { 23 switch (fetchType) {
23 case FetchResponseData::BasicType: 24 case FetchResponseData::BasicType:
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return m_internalResponse->mimeType(); 183 return m_internalResponse->mimeType();
183 } 184 }
184 return m_mimeType; 185 return m_mimeType;
185 } 186 }
186 187
187 FetchResponseData* FetchResponseData::clone(ScriptState* scriptState) 188 FetchResponseData* FetchResponseData::clone(ScriptState* scriptState)
188 { 189 {
189 FetchResponseData* newResponse = create(); 190 FetchResponseData* newResponse = create();
190 newResponse->m_type = m_type; 191 newResponse->m_type = m_type;
191 if (m_terminationReason) { 192 if (m_terminationReason) {
192 newResponse->m_terminationReason = adoptPtr(new TerminationReason); 193 newResponse->m_terminationReason = wrapUnique(new TerminationReason);
193 *newResponse->m_terminationReason = *m_terminationReason; 194 *newResponse->m_terminationReason = *m_terminationReason;
194 } 195 }
195 newResponse->m_url = m_url; 196 newResponse->m_url = m_url;
196 newResponse->m_status = m_status; 197 newResponse->m_status = m_status;
197 newResponse->m_statusMessage = m_statusMessage; 198 newResponse->m_statusMessage = m_statusMessage;
198 newResponse->m_headerList = m_headerList->clone(); 199 newResponse->m_headerList = m_headerList->clone();
199 newResponse->m_mimeType = m_mimeType; 200 newResponse->m_mimeType = m_mimeType;
200 newResponse->m_responseTime = m_responseTime; 201 newResponse->m_responseTime = m_responseTime;
201 newResponse->m_cacheStorageCacheName = m_cacheStorageCacheName; 202 newResponse->m_cacheStorageCacheName = m_cacheStorageCacheName;
202 newResponse->m_corsExposedHeaderNames = m_corsExposedHeaderNames; 203 newResponse->m_corsExposedHeaderNames = m_corsExposedHeaderNames;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 282 }
282 283
283 DEFINE_TRACE(FetchResponseData) 284 DEFINE_TRACE(FetchResponseData)
284 { 285 {
285 visitor->trace(m_headerList); 286 visitor->trace(m_headerList);
286 visitor->trace(m_internalResponse); 287 visitor->trace(m_internalResponse);
287 visitor->trace(m_buffer); 288 visitor->trace(m_buffer);
288 } 289 }
289 290
290 } // namespace blink 291 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchResponseData.h ('k') | third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698