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

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

Issue 2562953002: Part 5.2: Is policy list subsumed under subsuming policy? (Closed)
Patch Set: More test cases, removing .get() on members 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.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp
index f0c215dc6ce367f4b58a1d8be29ca6fc2a7fcaf2..274dd2c40409c27ad0cdd7d737d9d2f974060649 100644
--- a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp
@@ -21,7 +21,7 @@ MediaListDirective::MediaListDirective(const String& name,
parse(characters.data(), characters.data() + characters.size());
}
-bool MediaListDirective::allows(const String& type) {
+bool MediaListDirective::allows(const String& type) const {
return m_pluginTypes.contains(type);
}
@@ -84,7 +84,7 @@ void MediaListDirective::parse(const UChar* begin, const UChar* end) {
}
bool MediaListDirective::subsumes(
- const std::vector<MediaListDirective*>& other) {
+ const HeapVector<Member<MediaListDirective>>& other) const {
if (!other.size())
return false;
@@ -106,7 +106,8 @@ bool MediaListDirective::subsumes(
return true;
}
-HashSet<String> MediaListDirective::getIntersect(const HashSet<String>& other) {
+HashSet<String> MediaListDirective::getIntersect(
+ const HashSet<String>& other) const {
HashSet<String> normalized;
for (const auto& type : m_pluginTypes) {
if (other.contains(type))

Powered by Google App Engine
This is Rietveld 408576698