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

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

Issue 1009583003: Add CSP header for resources with an active policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add return statement to avoid compiler error Created 5 years, 9 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
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.cpp b/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 7533db5ee3cc34b2a34e511ebb043f580591ec65..8796316d1585c9462734c195400f19a6aa8b7a2b 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -900,6 +900,15 @@ bool ContentSecurityPolicy::experimentalFeaturesEnabled() const
return RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled();
}
+bool ContentSecurityPolicy::shouldSendCSPHeader(Resource::Type type) const
+{
+ for (const auto& policy : m_policies) {
+ if (policy->shouldSendCSPHeader(type))
+ return true;
+ }
+ return false;
+}
+
bool ContentSecurityPolicy::urlMatchesSelf(const KURL& url) const
{
return m_selfSource->matches(url, DidNotRedirect);
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698