| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/loader/FrameFetchContext.h" | 32 #include "core/loader/FrameFetchContext.h" |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptController.h" | 34 #include "bindings/core/v8/ScriptController.h" |
| 35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
| 36 #include "core/fetch/ClientHintsPreferences.h" | 36 #include "core/fetch/ClientHintsPreferences.h" |
| 37 #include "core/fetch/ResourceLoader.h" |
| 37 #include "core/fetch/UniqueIdentifier.h" | 38 #include "core/fetch/UniqueIdentifier.h" |
| 38 #include "core/frame/FrameConsole.h" | 39 #include "core/frame/FrameConsole.h" |
| 39 #include "core/frame/FrameHost.h" | 40 #include "core/frame/FrameHost.h" |
| 40 #include "core/frame/FrameView.h" | 41 #include "core/frame/FrameView.h" |
| 41 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 42 #include "core/frame/Settings.h" | 43 #include "core/frame/Settings.h" |
| 43 #include "core/html/HTMLFrameOwnerElement.h" | 44 #include "core/html/HTMLFrameOwnerElement.h" |
| 44 #include "core/html/imports/HTMLImportsController.h" | 45 #include "core/html/imports/HTMLImportsController.h" |
| 45 #include "core/inspector/ConsoleMessage.h" | 46 #include "core/inspector/ConsoleMessage.h" |
| 46 #include "core/inspector/InspectorInstrumentation.h" | 47 #include "core/inspector/InspectorInstrumentation.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 { | 233 { |
| 233 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre
ss()); | 234 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre
ss()); |
| 234 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do
cument(), NetworkHintsInterfaceImpl()); | 235 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do
cument(), NetworkHintsInterfaceImpl()); |
| 235 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { | 236 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { |
| 236 ResourceFetcher* fetcher = nullptr; | 237 ResourceFetcher* fetcher = nullptr; |
| 237 if (frame()->document()) | 238 if (frame()->document()) |
| 238 fetcher = frame()->document()->fetcher(); | 239 fetcher = frame()->document()->fetcher(); |
| 239 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe
ader(response.httpHeaderField("accept-ch"), fetcher); | 240 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe
ader(response.httpHeaderField("accept-ch"), fetcher); |
| 240 } | 241 } |
| 241 | 242 |
| 243 if (response.hasMajorCertificateErrors() && resourceLoader) |
| 244 MixedContentChecker::handleCertificateError(frame(), resourceLoader->ori
ginalRequest(), response); |
| 245 |
| 242 frame()->loader().progress().incrementProgress(identifier, response); | 246 frame()->loader().progress().incrementProgress(identifier, response); |
| 243 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide
ntifier, response); | 247 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide
ntifier, response); |
| 244 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E
VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame
(), response)); | 248 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E
VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame
(), response)); |
| 245 DocumentLoader* documentLoader = ensureLoaderForNotifications(); | 249 DocumentLoader* documentLoader = ensureLoaderForNotifications(); |
| 246 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do
cumentLoader, response, resourceLoader); | 250 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do
cumentLoader, response, resourceLoader); |
| 247 // It is essential that inspector gets resource response BEFORE console. | 251 // It is essential that inspector gets resource response BEFORE console. |
| 248 frame()->console().reportResourceResponseReceived(documentLoader, identifier
, response); | 252 frame()->console().reportResourceResponseReceived(documentLoader, identifier
, response); |
| 249 } | 253 } |
| 250 | 254 |
| 251 void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier, const c
har* data, int dataLength, int encodedDataLength) | 255 void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier, const c
har* data, int dataLength, int encodedDataLength) |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 } | 754 } |
| 751 | 755 |
| 752 DEFINE_TRACE(FrameFetchContext) | 756 DEFINE_TRACE(FrameFetchContext) |
| 753 { | 757 { |
| 754 visitor->trace(m_document); | 758 visitor->trace(m_document); |
| 755 visitor->trace(m_documentLoader); | 759 visitor->trace(m_documentLoader); |
| 756 FetchContext::trace(visitor); | 760 FetchContext::trace(visitor); |
| 757 } | 761 } |
| 758 | 762 |
| 759 } // namespace blink | 763 } // namespace blink |
| OLD | NEW |