| 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/Response.h" | 5 #include "modules/fetch/Response.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "core/html/FormData.h" | 24 #include "core/html/FormData.h" |
| 25 #include "core/streams/ReadableStreamOperations.h" | 25 #include "core/streams/ReadableStreamOperations.h" |
| 26 #include "modules/fetch/BlobBytesConsumer.h" | 26 #include "modules/fetch/BlobBytesConsumer.h" |
| 27 #include "modules/fetch/BodyStreamBuffer.h" | 27 #include "modules/fetch/BodyStreamBuffer.h" |
| 28 #include "modules/fetch/FormDataBytesConsumer.h" | 28 #include "modules/fetch/FormDataBytesConsumer.h" |
| 29 #include "modules/fetch/ResponseInit.h" | 29 #include "modules/fetch/ResponseInit.h" |
| 30 #include "platform/loader/fetch/FetchUtils.h" | 30 #include "platform/loader/fetch/FetchUtils.h" |
| 31 #include "platform/network/EncodedFormData.h" | 31 #include "platform/network/EncodedFormData.h" |
| 32 #include "platform/network/HTTPHeaderMap.h" | 32 #include "platform/network/HTTPHeaderMap.h" |
| 33 #include "platform/network/NetworkUtils.h" | 33 #include "platform/network/NetworkUtils.h" |
| 34 #include "platform/wtf/RefPtr.h" |
| 34 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" | 35 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" |
| 35 #include "wtf/RefPtr.h" | |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 FetchResponseData* CreateFetchResponseDataFromWebResponse( | 41 FetchResponseData* CreateFetchResponseDataFromWebResponse( |
| 42 ScriptState* script_state, | 42 ScriptState* script_state, |
| 43 const WebServiceWorkerResponse& web_response) { | 43 const WebServiceWorkerResponse& web_response) { |
| 44 FetchResponseData* response = nullptr; | 44 FetchResponseData* response = nullptr; |
| 45 if (web_response.Status() > 0) | 45 if (web_response.Status() > 0) |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 .Set(response.As<v8::Object>(), body_buffer); | 461 .Set(response.As<v8::Object>(), body_buffer); |
| 462 } | 462 } |
| 463 | 463 |
| 464 DEFINE_TRACE(Response) { | 464 DEFINE_TRACE(Response) { |
| 465 Body::Trace(visitor); | 465 Body::Trace(visitor); |
| 466 visitor->Trace(response_); | 466 visitor->Trace(response_); |
| 467 visitor->Trace(headers_); | 467 visitor->Trace(headers_); |
| 468 } | 468 } |
| 469 | 469 |
| 470 } // namespace blink | 470 } // namespace blink |
| OLD | NEW |