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

Unified Diff: third_party/WebKit/Source/core/frame/csp/MediaListDirective.h

Issue 2541843002: Part 5.1: Is policy list subsumed under subsuming policy? (Closed)
Patch Set: Fixing c++ vector initialization in the test Created 4 years 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: third_party/WebKit/Source/core/frame/csp/MediaListDirective.h
diff --git a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.h b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.h
index d6c67217476000e196ba6e546211afb80ff0d8a9..c9e5cbf7b9e7668216458e525fb87904509b2b18 100644
--- a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.h
+++ b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.h
@@ -14,7 +14,7 @@ namespace blink {
class ContentSecurityPolicy;
-class MediaListDirective final : public CSPDirective {
+class CORE_EXPORT MediaListDirective final : public CSPDirective {
WTF_MAKE_NONCOPYABLE(MediaListDirective);
public:
@@ -23,9 +23,20 @@ class MediaListDirective final : public CSPDirective {
ContentSecurityPolicy*);
bool allows(const String& type);
+ // The algorothm is described more extensively here:
+ // https://w3c.github.io/webappsec-csp/embedded/#subsume-policy.
+ bool subsumes(const std::vector<MediaListDirective*>& other);
+
private:
+ FRIEND_TEST_ALL_PREFIXES(MediaListDirectiveTest, GetIntersect);
+ FRIEND_TEST_ALL_PREFIXES(MediaListDirectiveTest, Subsumes);
+
void parse(const UChar* begin, const UChar* end);
+ // The algorothm is described more extensively here:
+ // https://w3c.github.io/webappsec-csp/embedded/#subsume-policy.
+ HashSet<String> getIntersect(const HashSet<String>& other);
+
HashSet<String> m_pluginTypes;
};
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698