| 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 30 matching lines...) Expand all Loading... |
| 41 #include "core/frame/FrameView.h" | 41 #include "core/frame/FrameView.h" |
| 42 #include "core/frame/LocalDOMWindow.h" | 42 #include "core/frame/LocalDOMWindow.h" |
| 43 #include "core/frame/LocalFrame.h" | 43 #include "core/frame/LocalFrame.h" |
| 44 #include "core/frame/LocalFrameClient.h" | 44 #include "core/frame/LocalFrameClient.h" |
| 45 #include "core/frame/Settings.h" | 45 #include "core/frame/Settings.h" |
| 46 #include "core/frame/UseCounter.h" | 46 #include "core/frame/UseCounter.h" |
| 47 #include "core/html/HTMLFrameOwnerElement.h" | 47 #include "core/html/HTMLFrameOwnerElement.h" |
| 48 #include "core/html/imports/HTMLImportsController.h" | 48 #include "core/html/imports/HTMLImportsController.h" |
| 49 #include "core/inspector/ConsoleMessage.h" | 49 #include "core/inspector/ConsoleMessage.h" |
| 50 #include "core/inspector/IdentifiersFactory.h" | 50 #include "core/inspector/IdentifiersFactory.h" |
| 51 #include "core/inspector/InspectorNetworkAgent.h" |
| 51 #include "core/inspector/InspectorTraceEvents.h" | 52 #include "core/inspector/InspectorTraceEvents.h" |
| 52 #include "core/loader/DocumentLoader.h" | 53 #include "core/loader/DocumentLoader.h" |
| 53 #include "core/loader/FrameLoader.h" | 54 #include "core/loader/FrameLoader.h" |
| 54 #include "core/loader/MixedContentChecker.h" | 55 #include "core/loader/MixedContentChecker.h" |
| 55 #include "core/loader/NetworkHintsInterface.h" | 56 #include "core/loader/NetworkHintsInterface.h" |
| 56 #include "core/loader/PingLoader.h" | 57 #include "core/loader/PingLoader.h" |
| 57 #include "core/loader/ProgressTracker.h" | 58 #include "core/loader/ProgressTracker.h" |
| 58 #include "core/loader/SubresourceFilter.h" | 59 #include "core/loader/SubresourceFilter.h" |
| 59 #include "core/loader/appcache/ApplicationCacheHost.h" | 60 #include "core/loader/appcache/ApplicationCacheHost.h" |
| 60 #include "core/loader/private/FrameClientHintsPreferencesContext.h" | 61 #include "core/loader/private/FrameClientHintsPreferencesContext.h" |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 } | 717 } |
| 717 | 718 |
| 718 ResourceRequestBlockedReason FrameFetchContext::canRequestInternal( | 719 ResourceRequestBlockedReason FrameFetchContext::canRequestInternal( |
| 719 Resource::Type type, | 720 Resource::Type type, |
| 720 const ResourceRequest& resourceRequest, | 721 const ResourceRequest& resourceRequest, |
| 721 const KURL& url, | 722 const KURL& url, |
| 722 const ResourceLoaderOptions& options, | 723 const ResourceLoaderOptions& options, |
| 723 SecurityViolationReportingPolicy reportingPolicy, | 724 SecurityViolationReportingPolicy reportingPolicy, |
| 724 FetchRequest::OriginRestriction originRestriction, | 725 FetchRequest::OriginRestriction originRestriction, |
| 725 ResourceRequest::RedirectStatus redirectStatus) const { | 726 ResourceRequest::RedirectStatus redirectStatus) const { |
| 726 bool shouldBlockRequest = false; | 727 if (probe::shouldBlockRequest(frame(), resourceRequest)) |
| 727 probe::shouldBlockRequest(frame(), resourceRequest, &shouldBlockRequest); | |
| 728 if (shouldBlockRequest) | |
| 729 return ResourceRequestBlockedReason::Inspector; | 728 return ResourceRequestBlockedReason::Inspector; |
| 730 | 729 |
| 731 SecurityOrigin* securityOrigin = options.securityOrigin.get(); | 730 SecurityOrigin* securityOrigin = options.securityOrigin.get(); |
| 732 if (!securityOrigin && m_document) | 731 if (!securityOrigin && m_document) |
| 733 securityOrigin = m_document->getSecurityOrigin(); | 732 securityOrigin = m_document->getSecurityOrigin(); |
| 734 | 733 |
| 735 if (originRestriction != FetchRequest::NoOriginRestriction && | 734 if (originRestriction != FetchRequest::NoOriginRestriction && |
| 736 securityOrigin && !securityOrigin->canDisplay(url)) { | 735 securityOrigin && !securityOrigin->canDisplay(url)) { |
| 737 if (reportingPolicy == SecurityViolationReportingPolicy::Report) | 736 if (reportingPolicy == SecurityViolationReportingPolicy::Report) |
| 738 FrameLoader::reportLocalLoadFailed(frame(), url.elidedString()); | 737 FrameLoader::reportLocalLoadFailed(frame(), url.elidedString()); |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 return frame()->frameScheduler()->loadingTaskRunner(); | 1064 return frame()->frameScheduler()->loadingTaskRunner(); |
| 1066 } | 1065 } |
| 1067 | 1066 |
| 1068 DEFINE_TRACE(FrameFetchContext) { | 1067 DEFINE_TRACE(FrameFetchContext) { |
| 1069 visitor->trace(m_document); | 1068 visitor->trace(m_document); |
| 1070 visitor->trace(m_documentLoader); | 1069 visitor->trace(m_documentLoader); |
| 1071 FetchContext::trace(visitor); | 1070 FetchContext::trace(visitor); |
| 1072 } | 1071 } |
| 1073 | 1072 |
| 1074 } // namespace blink | 1073 } // namespace blink |
| OLD | NEW |