Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
index b2f46c545946764982f7b444fdbc1a2e1055e001..c1289356bf8018e79a48e839c5387a14de0a2e52 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
@@ -35,6 +35,7 @@ |
#include "bindings/core/v8/ScriptController.h" |
#include "bindings/core/v8/V8DOMActivityLogger.h" |
#include "core/dom/Document.h" |
+#include "core/frame/ContentSettingsClient.h" |
#include "core/frame/Deprecation.h" |
#include "core/frame/FrameConsole.h" |
#include "core/frame/FrameView.h" |
@@ -342,6 +343,10 @@ LocalFrameClient* FrameFetchContext::localFrameClient() const { |
return frame()->client(); |
} |
+ContentSettingsClient* FrameFetchContext::contentSettingsClient() const { |
+ return frame()->contentSettingsClient(); |
+} |
+ |
void FrameFetchContext::addAdditionalRequestHeaders(ResourceRequest& request, |
FetchResourceType type) { |
bool isMainResource = type == FetchMainResource; |
@@ -652,7 +657,7 @@ void FrameFetchContext::addResourceTiming(const ResourceTimingInfo& info) { |
} |
bool FrameFetchContext::allowImage(bool imagesEnabled, const KURL& url) const { |
- return localFrameClient()->allowImage(imagesEnabled, url); |
+ return contentSettingsClient()->allowImage(imagesEnabled, url); |
} |
void FrameFetchContext::printAccessDeniedMessage(const KURL& url) const { |
@@ -787,10 +792,10 @@ ResourceRequestBlockedReason FrameFetchContext::canRequestInternal( |
if (type == Resource::Script || type == Resource::ImportResource) { |
DCHECK(frame()); |
- if (!localFrameClient()->allowScriptFromSource( |
+ if (!contentSettingsClient()->allowScriptFromSource( |
!frame()->settings() || frame()->settings()->getScriptEnabled(), |
url)) { |
- localFrameClient()->didNotAllowScript(); |
+ contentSettingsClient()->didNotAllowScript(); |
// TODO(estark): Use a different ResourceRequestBlockedReason here, since |
// this check has nothing to do with CSP. https://crbug.com/600795 |
return ResourceRequestBlockedReason::CSP; |