Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(872)

Unified Diff: Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 1326823003: CSP: 'frame-ancestors' should override 'x-frame-options'. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.cpp b/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 78d708fbd1658383281944db8bd972ba7965c3d3..2fea03c2834cb155ec5e940e614342431777f166 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -615,6 +615,15 @@ bool ContentSecurityPolicy::allowAncestors(LocalFrame* frame, const KURL& url, C
return isAllowedByAllWithFrame<&CSPDirectiveList::allowAncestors>(m_policies, frame, url, reportingStatus);
}
+bool ContentSecurityPolicy::isFrameAncestorsEnforced() const
+{
+ for (const auto& policy : m_policies) {
+ if (policy->isFrameAncestorsEnforced())
+ return true;
+ }
+ return false;
+}
+
bool ContentSecurityPolicy::isActive() const
{
return !m_policies.isEmpty();

Powered by Google App Engine
This is Rietveld 408576698