OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/frame/csp/MediaListDirective.h" | 5 #include "core/frame/csp/MediaListDirective.h" |
6 | 6 |
7 #include "core/frame/csp/ContentSecurityPolicy.h" | 7 #include "core/frame/csp/ContentSecurityPolicy.h" |
8 #include "platform/ParsingUtilities.h" | |
9 #include "platform/network/ContentSecurityPolicyParsers.h" | 8 #include "platform/network/ContentSecurityPolicyParsers.h" |
10 #include "wtf/HashSet.h" | 9 #include "wtf/HashSet.h" |
| 10 #include "wtf/text/ParsingUtilities.h" |
11 #include "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 MediaListDirective::MediaListDirective(const String& name, const String& value,
ContentSecurityPolicy* policy) | 15 MediaListDirective::MediaListDirective(const String& name, const String& value,
ContentSecurityPolicy* policy) |
16 : CSPDirective(name, value, policy) | 16 : CSPDirective(name, value, policy) |
17 { | 17 { |
18 Vector<UChar> characters; | 18 Vector<UChar> characters; |
19 value.appendTo(characters); | 19 value.appendTo(characters); |
20 parse(characters.data(), characters.data() + characters.size()); | 20 parse(characters.data(), characters.data() + characters.size()); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 policy()->reportInvalidPluginTypes(String(begin, position - begin)); | 76 policy()->reportInvalidPluginTypes(String(begin, position - begin)); |
77 continue; | 77 continue; |
78 } | 78 } |
79 m_pluginTypes.add(String(begin, position - begin)); | 79 m_pluginTypes.add(String(begin, position - begin)); |
80 | 80 |
81 ASSERT(position == end || isASCIISpace(*position)); | 81 ASSERT(position == end || isASCIISpace(*position)); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
OLD | NEW |