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 #ifndef SourceListDirective_h | 5 #ifndef SourceListDirective_h |
6 #define SourceListDirective_h | 6 #define SourceListDirective_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/frame/csp/CSPDirective.h" | 9 #include "core/frame/csp/CSPDirective.h" |
10 #include "core/frame/csp/CSPSource.h" | 10 #include "core/frame/csp/CSPSource.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void addSourceSelf(); | 85 void addSourceSelf(); |
86 void addSourceStar(); | 86 void addSourceStar(); |
87 void addSourceUnsafeInline(); | 87 void addSourceUnsafeInline(); |
88 void addSourceUnsafeEval(); | 88 void addSourceUnsafeEval(); |
89 void addSourceStrictDynamic(); | 89 void addSourceStrictDynamic(); |
90 void addSourceUnsafeHashedAttributes(); | 90 void addSourceUnsafeHashedAttributes(); |
91 void addSourceNonce(const String& nonce); | 91 void addSourceNonce(const String& nonce); |
92 void addSourceHash(const ContentSecurityPolicyHashAlgorithm&, | 92 void addSourceHash(const ContentSecurityPolicyHashAlgorithm&, |
93 const DigestValue& hash); | 93 const DigestValue& hash); |
94 | 94 |
95 static void addSourceToMap(HashMap<String, CSPSource*>&, CSPSource*); | 95 static void addSourceToMap(HeapHashMap<String, Member<CSPSource>>&, |
| 96 CSPSource*); |
96 | 97 |
97 bool hasSourceMatchInList(const KURL&, ResourceRequest::RedirectStatus) const; | 98 bool hasSourceMatchInList(const KURL&, ResourceRequest::RedirectStatus) const; |
98 HeapVector<Member<CSPSource>> getIntersectCSPSources( | 99 HeapVector<Member<CSPSource>> getIntersectCSPSources( |
99 HeapVector<Member<CSPSource>> other); | 100 HeapVector<Member<CSPSource>> other); |
100 HashMap<String, CSPSource*> getIntersectSchemesOnly( | 101 HeapHashMap<String, Member<CSPSource>> getIntersectSchemesOnly( |
101 HeapVector<Member<CSPSource>> other); | 102 HeapVector<Member<CSPSource>> other); |
102 | 103 |
103 Member<ContentSecurityPolicy> m_policy; | 104 Member<ContentSecurityPolicy> m_policy; |
104 HeapVector<Member<CSPSource>> m_list; | 105 HeapVector<Member<CSPSource>> m_list; |
105 String m_directiveName; | 106 String m_directiveName; |
106 bool m_allowSelf; | 107 bool m_allowSelf; |
107 bool m_allowStar; | 108 bool m_allowStar; |
108 bool m_allowInline; | 109 bool m_allowInline; |
109 bool m_allowEval; | 110 bool m_allowEval; |
110 bool m_allowDynamic; | 111 bool m_allowDynamic; |
111 bool m_allowHashedAttributes; | 112 bool m_allowHashedAttributes; |
112 HashSet<String> m_nonces; | 113 HashSet<String> m_nonces; |
113 HashSet<CSPHashValue> m_hashes; | 114 HashSet<CSPHashValue> m_hashes; |
114 uint8_t m_hashAlgorithmsUsed; | 115 uint8_t m_hashAlgorithmsUsed; |
115 }; | 116 }; |
116 | 117 |
117 } // namespace blink | 118 } // namespace blink |
118 | 119 |
119 #endif | 120 #endif |
OLD | NEW |