| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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 "core/loader/FrameFetchContext.h" | 31 #include "core/loader/FrameFetchContext.h" |
| 32 | 32 |
| 33 #include "bindings/core/v8/ScriptController.h" | 33 #include "bindings/core/v8/ScriptController.h" |
| 34 #include "bindings/core/v8/V8DOMActivityLogger.h" | 34 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
| 36 #include "core/frame/Deprecation.h" |
| 36 #include "core/frame/FrameConsole.h" | 37 #include "core/frame/FrameConsole.h" |
| 37 #include "core/frame/FrameHost.h" | 38 #include "core/frame/FrameHost.h" |
| 38 #include "core/frame/FrameView.h" | 39 #include "core/frame/FrameView.h" |
| 39 #include "core/frame/LocalDOMWindow.h" | 40 #include "core/frame/LocalDOMWindow.h" |
| 40 #include "core/frame/LocalFrame.h" | 41 #include "core/frame/LocalFrame.h" |
| 41 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
| 42 #include "core/frame/UseCounter.h" | 43 #include "core/frame/UseCounter.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" |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 | 758 |
| 758 // Measure the number of legacy URL schemes ('ftp://') and the number of | 759 // Measure the number of legacy URL schemes ('ftp://') and the number of |
| 759 // embedded-credential ('http://user:password@...') resources embedded as | 760 // embedded-credential ('http://user:password@...') resources embedded as |
| 760 // subresources. in the hopes that we can block them at some point in the | 761 // subresources. in the hopes that we can block them at some point in the |
| 761 // future. | 762 // future. |
| 762 if (resourceRequest.frameType() != WebURLRequest::FrameTypeTopLevel) { | 763 if (resourceRequest.frameType() != WebURLRequest::FrameTypeTopLevel) { |
| 763 DCHECK(frame()->document()); | 764 DCHECK(frame()->document()); |
| 764 if (SchemeRegistry::shouldTreatURLSchemeAsLegacy(url.protocol()) && | 765 if (SchemeRegistry::shouldTreatURLSchemeAsLegacy(url.protocol()) && |
| 765 !SchemeRegistry::shouldTreatURLSchemeAsLegacy( | 766 !SchemeRegistry::shouldTreatURLSchemeAsLegacy( |
| 766 frame()->document()->getSecurityOrigin()->protocol())) { | 767 frame()->document()->getSecurityOrigin()->protocol())) { |
| 767 UseCounter::count(frame()->document(), | 768 Deprecation::countDeprecation( |
| 768 UseCounter::LegacyProtocolEmbeddedAsSubresource); | 769 frame()->document(), UseCounter::LegacyProtocolEmbeddedAsSubresource); |
| 769 } | 770 } |
| 770 if (!url.user().isEmpty() || !url.pass().isEmpty()) { | 771 if (!url.user().isEmpty() || !url.pass().isEmpty()) { |
| 771 UseCounter::count( | 772 Deprecation::countDeprecation( |
| 772 frame()->document(), | 773 frame()->document(), |
| 773 UseCounter::RequestedSubresourceWithEmbeddedCredentials); | 774 UseCounter::RequestedSubresourceWithEmbeddedCredentials); |
| 774 } | 775 } |
| 775 } | 776 } |
| 776 | 777 |
| 777 // Check for mixed content. We do this second-to-last so that when folks block | 778 // Check for mixed content. We do this second-to-last so that when folks block |
| 778 // mixed content with a CSP policy, they don't get a warning. They'll still | 779 // mixed content with a CSP policy, they don't get a warning. They'll still |
| 779 // get a warning in the console about CSP blocking the load. | 780 // get a warning in the console about CSP blocking the load. |
| 780 MixedContentChecker::ReportingStatus mixedContentReporting = | 781 MixedContentChecker::ReportingStatus mixedContentReporting = |
| 781 forPreload ? MixedContentChecker::SuppressReport | 782 forPreload ? MixedContentChecker::SuppressReport |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 response); | 1059 response); |
| 1059 } | 1060 } |
| 1060 | 1061 |
| 1061 DEFINE_TRACE(FrameFetchContext) { | 1062 DEFINE_TRACE(FrameFetchContext) { |
| 1062 visitor->trace(m_document); | 1063 visitor->trace(m_document); |
| 1063 visitor->trace(m_documentLoader); | 1064 visitor->trace(m_documentLoader); |
| 1064 FetchContext::trace(visitor); | 1065 FetchContext::trace(visitor); |
| 1065 } | 1066 } |
| 1066 | 1067 |
| 1067 } // namespace blink | 1068 } // namespace blink |
| OLD | NEW |