| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "core/loader/DocumentThreadableLoader.h" | 32 #include "core/loader/DocumentThreadableLoader.h" |
| 33 | 33 |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/dom/TaskRunnerHelper.h" |
| 35 #include "core/fetch/CrossOriginAccessControl.h" | 36 #include "core/fetch/CrossOriginAccessControl.h" |
| 36 #include "core/fetch/FetchRequest.h" | 37 #include "core/fetch/FetchRequest.h" |
| 37 #include "core/fetch/FetchUtils.h" | 38 #include "core/fetch/FetchUtils.h" |
| 38 #include "core/fetch/Resource.h" | 39 #include "core/fetch/Resource.h" |
| 39 #include "core/fetch/ResourceFetcher.h" | 40 #include "core/fetch/ResourceFetcher.h" |
| 40 #include "core/frame/FrameConsole.h" | 41 #include "core/frame/FrameConsole.h" |
| 41 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 42 #include "core/inspector/InspectorInstrumentation.h" | 43 #include "core/inspector/InspectorInstrumentation.h" |
| 43 #include "core/inspector/InspectorTraceEvents.h" | 44 #include "core/inspector/InspectorTraceEvents.h" |
| 44 #include "core/loader/CrossOriginPreflightResultCache.h" | 45 #include "core/loader/CrossOriginPreflightResultCache.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 : m_client(client), | 158 : m_client(client), |
| 158 m_document(&document), | 159 m_document(&document), |
| 159 m_options(options), | 160 m_options(options), |
| 160 m_resourceLoaderOptions(resourceLoaderOptions), | 161 m_resourceLoaderOptions(resourceLoaderOptions), |
| 161 m_forceDoNotAllowStoredCredentials(false), | 162 m_forceDoNotAllowStoredCredentials(false), |
| 162 m_securityOrigin(m_resourceLoaderOptions.securityOrigin), | 163 m_securityOrigin(m_resourceLoaderOptions.securityOrigin), |
| 163 m_sameOriginRequest(false), | 164 m_sameOriginRequest(false), |
| 164 m_isUsingDataConsumerHandle(false), | 165 m_isUsingDataConsumerHandle(false), |
| 165 m_async(blockingBehavior == LoadAsynchronously), | 166 m_async(blockingBehavior == LoadAsynchronously), |
| 166 m_requestContext(WebURLRequest::RequestContextUnspecified), | 167 m_requestContext(WebURLRequest::RequestContextUnspecified), |
| 167 m_timeoutTimer(this, &DocumentThreadableLoader::didTimeout), | 168 m_timeoutTimer(TaskRunnerHelper::get(TaskType::Networking, &document), |
| 169 this, |
| 170 &DocumentThreadableLoader::didTimeout), |
| 168 m_requestStartedSeconds(0.0), | 171 m_requestStartedSeconds(0.0), |
| 169 m_corsRedirectLimit(m_options.crossOriginRequestPolicy == UseAccessControl | 172 m_corsRedirectLimit(m_options.crossOriginRequestPolicy == UseAccessControl |
| 170 ? kMaxCORSRedirects | 173 ? kMaxCORSRedirects |
| 171 : 0), | 174 : 0), |
| 172 m_redirectMode(WebURLRequest::FetchRedirectModeFollow), | 175 m_redirectMode(WebURLRequest::FetchRedirectModeFollow), |
| 173 m_overrideReferrer(false) { | 176 m_overrideReferrer(false) { |
| 174 DCHECK(client); | 177 DCHECK(client); |
| 175 } | 178 } |
| 176 | 179 |
| 177 void DocumentThreadableLoader::start(const ResourceRequest& request) { | 180 void DocumentThreadableLoader::start(const ResourceRequest& request) { |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 } | 1117 } |
| 1115 | 1118 |
| 1116 DEFINE_TRACE(DocumentThreadableLoader) { | 1119 DEFINE_TRACE(DocumentThreadableLoader) { |
| 1117 visitor->trace(m_resource); | 1120 visitor->trace(m_resource); |
| 1118 visitor->trace(m_document); | 1121 visitor->trace(m_document); |
| 1119 ThreadableLoader::trace(visitor); | 1122 ThreadableLoader::trace(visitor); |
| 1120 RawResourceClient::trace(visitor); | 1123 RawResourceClient::trace(visitor); |
| 1121 } | 1124 } |
| 1122 | 1125 |
| 1123 } // namespace blink | 1126 } // namespace blink |
| OLD | NEW |