Index: Source/core/frame/csp/CSPDirectiveList.cpp |
diff --git a/Source/core/frame/csp/CSPDirectiveList.cpp b/Source/core/frame/csp/CSPDirectiveList.cpp |
index e7dbb996d57cd1090d3233ed4aafc458d2a35e19..da027ad89b46f6bba0b8db88477502e712316b8c 100644 |
--- a/Source/core/frame/csp/CSPDirectiveList.cpp |
+++ b/Source/core/frame/csp/CSPDirectiveList.cpp |
@@ -408,6 +408,36 @@ const String& CSPDirectiveList::pluginTypesText() const |
return m_pluginTypes->text(); |
} |
+bool CSPDirectiveList::hasScriptPolicy() const |
+{ |
+ return !!operativeDirective(m_scriptSrc.get()); |
+} |
+ |
+bool CSPDirectiveList::hasStylePolicy() const |
+{ |
+ return !!operativeDirective(m_styleSrc.get()); |
+} |
+ |
+bool CSPDirectiveList::hasImagePolicy() const |
+{ |
+ return !!operativeDirective(m_imgSrc.get()); |
+} |
+ |
+bool CSPDirectiveList::hasFontPolicy() const |
+{ |
+ return !!operativeDirective(m_fontSrc.get()); |
+} |
+ |
+bool CSPDirectiveList::hasMediaPolicy() const |
+{ |
+ return !!operativeDirective(m_mediaSrc.get()); |
+} |
+ |
+bool CSPDirectiveList::hasPluginPolicy() const |
+{ |
+ return !!operativeDirective(m_objectSrc.get()); |
Mike West
2015/03/16 10:39:11
Should this take `plugin-types` into account as we
estark
2015/03/17 18:27:34
I can't quite figure out if it's necessary or not,
|
+} |
+ |
// policy = directive-list |
// directive-list = [ directive *( ";" [ directive ] ) ] |
// |