Chromium Code Reviews| 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 22 matching lines...) Expand all Loading... | |
| 33 #include "platform/HTTPNames.h" | 33 #include "platform/HTTPNames.h" |
| 34 #include "platform/network/ResourceError.h" | 34 #include "platform/network/ResourceError.h" |
| 35 #include "platform/network/ResourceRequest.h" | 35 #include "platform/network/ResourceRequest.h" |
| 36 #include "platform/network/ResourceResponse.h" | 36 #include "platform/network/ResourceResponse.h" |
| 37 #include "platform/weborigin/SchemeRegistry.h" | 37 #include "platform/weborigin/SchemeRegistry.h" |
| 38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
| 39 #include "platform/weborigin/SecurityPolicy.h" | 39 #include "platform/weborigin/SecurityPolicy.h" |
| 40 #include "public/platform/WebURLRequest.h" | 40 #include "public/platform/WebURLRequest.h" |
| 41 #include "wtf/HashSet.h" | 41 #include "wtf/HashSet.h" |
| 42 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
| 43 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
|
tyoshino (SeeGerritForStatus)
2016/03/03 11:53:39
add OwnPtr.h
hiroshige
2016/03/08 23:39:25
Done.
| |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 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 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 void performHTTPFetch(bool corsFlag, bool corsPreflightFlag); | 158 void performHTTPFetch(bool corsFlag, bool corsPreflightFlag); |
| 159 void performDataFetch(); | 159 void performDataFetch(); |
| 160 void failed(const String& message); | 160 void failed(const String& message); |
| 161 void notifyFinished(); | 161 void notifyFinished(); |
| 162 Document* document() const; | 162 Document* document() const; |
| 163 void loadSucceeded(); | 163 void loadSucceeded(); |
| 164 | 164 |
| 165 Member<FetchManager> m_fetchManager; | 165 Member<FetchManager> m_fetchManager; |
| 166 Member<ScriptPromiseResolver> m_resolver; | 166 Member<ScriptPromiseResolver> m_resolver; |
| 167 Member<FetchRequestData> m_request; | 167 Member<FetchRequestData> m_request; |
| 168 RefPtr<ThreadableLoader> m_loader; | 168 OwnPtr<ThreadableLoader> m_loader; |
| 169 bool m_failed; | 169 bool m_failed; |
| 170 bool m_finished; | 170 bool m_finished; |
| 171 int m_responseHttpStatusCode; | 171 int m_responseHttpStatusCode; |
| 172 Member<SRIVerifier> m_integrityVerifier; | 172 Member<SRIVerifier> m_integrityVerifier; |
| 173 bool m_didFinishLoading; | 173 bool m_didFinishLoading; |
| 174 bool m_isIsolatedWorld; | 174 bool m_isIsolatedWorld; |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 FetchManager::Loader::Loader(ExecutionContext* executionContext, FetchManager* f etchManager, ScriptPromiseResolver* resolver, FetchRequestData* request, bool is IsolatedWorld) | 177 FetchManager::Loader::Loader(ExecutionContext* executionContext, FetchManager* f etchManager, ScriptPromiseResolver* resolver, FetchRequestData* request, bool is IsolatedWorld) |
| 178 : ContextLifecycleObserver(executionContext) | 178 : ContextLifecycleObserver(executionContext) |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 713 loader->dispose(); | 713 loader->dispose(); |
| 714 } | 714 } |
| 715 | 715 |
| 716 DEFINE_TRACE(FetchManager) | 716 DEFINE_TRACE(FetchManager) |
| 717 { | 717 { |
| 718 visitor->trace(m_executionContext); | 718 visitor->trace(m_executionContext); |
| 719 visitor->trace(m_loaders); | 719 visitor->trace(m_loaders); |
| 720 } | 720 } |
| 721 | 721 |
| 722 } // namespace blink | 722 } // namespace blink |
| OLD | NEW |