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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 { | 231 { |
231 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss()); | 232 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss()); |
232 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do cument(), NetworkHintsInterfaceImpl()); | 233 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do cument(), NetworkHintsInterfaceImpl()); |
233 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { | 234 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { |
234 ResourceFetcher* fetcher = nullptr; | 235 ResourceFetcher* fetcher = nullptr; |
235 if (frame()->document()) | 236 if (frame()->document()) |
236 fetcher = frame()->document()->fetcher(); | 237 fetcher = frame()->document()->fetcher(); |
237 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe ader(response.httpHeaderField("accept-ch"), fetcher); | 238 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe ader(response.httpHeaderField("accept-ch"), fetcher); |
238 } | 239 } |
239 | 240 |
241 if (response.hasMajorCertificateErrors() && resourceLoader) | |
242 MixedContentChecker::handleCertificateError(MixedContentChecker::effecti veFrameForFrameType(frame(), resourceLoader->originalRequest().frameType()), res ponse.url(), resourceLoader->originalRequest().requestContext(), resourceLoader- >originalRequest().frameType(), response.getSecurityInfo()); | |
Mike West
2015/11/27 05:30:38
Nit: This could be simpler to understand if you ju
estark
2015/11/28 02:46:56
Done.
| |
243 | |
240 frame()->loader().progress().incrementProgress(identifier, response); | 244 frame()->loader().progress().incrementProgress(identifier, response); |
241 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response); | 245 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response); |
242 DocumentLoader* documentLoader = ensureLoaderForNotifications(); | 246 DocumentLoader* documentLoader = ensureLoaderForNotifications(); |
243 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do cumentLoader, response, resourceLoader); | 247 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do cumentLoader, response, resourceLoader); |
244 // It is essential that inspector gets resource response BEFORE console. | 248 // It is essential that inspector gets resource response BEFORE console. |
245 frame()->console().reportResourceResponseReceived(documentLoader, identifier , response); | 249 frame()->console().reportResourceResponseReceived(documentLoader, identifier , response); |
246 } | 250 } |
247 | 251 |
248 void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier, const c har* data, int dataLength, int encodedDataLength) | 252 void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier, const c har* data, int dataLength, int encodedDataLength) |
249 { | 253 { |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
734 } | 738 } |
735 | 739 |
736 DEFINE_TRACE(FrameFetchContext) | 740 DEFINE_TRACE(FrameFetchContext) |
737 { | 741 { |
738 visitor->trace(m_document); | 742 visitor->trace(m_document); |
739 visitor->trace(m_documentLoader); | 743 visitor->trace(m_documentLoader); |
740 FetchContext::trace(visitor); | 744 FetchContext::trace(visitor); |
741 } | 745 } |
742 | 746 |
743 } // namespace blink | 747 } // namespace blink |
OLD | NEW |