Chromium Code Reviews| 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..bb8149db307347d37fe8015c8c98684ea56b3167 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)) |
| @@ -116,4 +117,8 @@ HashSet<String> MediaListDirective::getIntersect(const HashSet<String>& other) { |
| return normalized; |
| } |
| +DEFINE_TRACE(MediaListDirective) { |
| + CSPDirective::trace(visitor); |
|
amalika
2016/12/13 08:31:52
This seems unnecessary since MediaListDirective do
haraken
2016/12/13 08:43:38
It won't be needed.
|
| +} |
| + |
| } // namespace blink |