| 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/FetchManager.h" | 5 #include "modules/fetch/FetchManager.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/V8ThrowException.h" | 10 #include "bindings/core/v8/V8ThrowException.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 bool IsRedirectStatusCode(int statusCode) | 49 bool IsRedirectStatusCode(int statusCode) |
| 50 { | 50 { |
| 51 return (statusCode == 301 || statusCode == 302 || statusCode == 303 || statu
sCode == 307 || statusCode == 308); | 51 return (statusCode == 301 || statusCode == 302 || statusCode == 303 || statu
sCode == 307 || statusCode == 308); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 class FetchManager::Loader final : public GarbageCollectedFinalized<FetchManager
::Loader>, public ThreadableLoaderClient, public ContextLifecycleObserver { | 56 class FetchManager::Loader final : public GarbageCollectedFinalized<FetchManager
::Loader>, public ThreadableLoaderClient, public ContextLifecycleObserver { |
| 57 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FetchManager::Loader); | 57 USING_GARBAGE_COLLECTED_MIXIN(FetchManager::Loader); |
| 58 public: | 58 public: |
| 59 static Loader* create(ExecutionContext* executionContext, FetchManager* fetc
hManager, ScriptPromiseResolver* resolver, FetchRequestData* request, bool isIso
latedWorld) | 59 static Loader* create(ExecutionContext* executionContext, FetchManager* fetc
hManager, ScriptPromiseResolver* resolver, FetchRequestData* request, bool isIso
latedWorld) |
| 60 { | 60 { |
| 61 return new Loader(executionContext, fetchManager, resolver, request, isI
solatedWorld); | 61 return new Loader(executionContext, fetchManager, resolver, request, isI
solatedWorld); |
| 62 } | 62 } |
| 63 | 63 |
| 64 ~Loader() override; | 64 ~Loader() override; |
| 65 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
| 66 | 66 |
| 67 void didReceiveResponse(unsigned long, const ResourceResponse&, PassOwnPtr<W
ebDataConsumerHandle>) override; | 67 void didReceiveResponse(unsigned long, const ResourceResponse&, PassOwnPtr<W
ebDataConsumerHandle>) override; |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 loader->dispose(); | 714 loader->dispose(); |
| 715 } | 715 } |
| 716 | 716 |
| 717 DEFINE_TRACE(FetchManager) | 717 DEFINE_TRACE(FetchManager) |
| 718 { | 718 { |
| 719 visitor->trace(m_executionContext); | 719 visitor->trace(m_executionContext); |
| 720 visitor->trace(m_loaders); | 720 visitor->trace(m_loaders); |
| 721 } | 721 } |
| 722 | 722 |
| 723 } // namespace blink | 723 } // namespace blink |
| OLD | NEW |