| 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 CSPSourceList_h | 5 #ifndef CSPSourceList_h |
| 6 #define CSPSourceList_h | 6 #define CSPSourceList_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/frame/csp/CSPSource.h" | 9 #include "core/frame/csp/CSPSource.h" |
| 10 #include "platform/Crypto.h" | 10 #include "platform/Crypto.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 bool parseHost(const UChar* begin, const UChar* end, String& host, CSPSource
::WildcardDisposition&); | 45 bool parseHost(const UChar* begin, const UChar* end, String& host, CSPSource
::WildcardDisposition&); |
| 46 bool parsePort(const UChar* begin, const UChar* end, int& port, CSPSource::W
ildcardDisposition&); | 46 bool parsePort(const UChar* begin, const UChar* end, int& port, CSPSource::W
ildcardDisposition&); |
| 47 bool parsePath(const UChar* begin, const UChar* end, String& path); | 47 bool parsePath(const UChar* begin, const UChar* end, String& path); |
| 48 bool parseNonce(const UChar* begin, const UChar* end, String& nonce); | 48 bool parseNonce(const UChar* begin, const UChar* end, String& nonce); |
| 49 bool parseHash(const UChar* begin, const UChar* end, DigestValue& hash, Cont
entSecurityPolicyHashAlgorithm&); | 49 bool parseHash(const UChar* begin, const UChar* end, DigestValue& hash, Cont
entSecurityPolicyHashAlgorithm&); |
| 50 | 50 |
| 51 void addSourceSelf(); | 51 void addSourceSelf(); |
| 52 void addSourceStar(); | 52 void addSourceStar(); |
| 53 void addSourceUnsafeInline(); | 53 void addSourceUnsafeInline(); |
| 54 void addSourceUnsafeEval(); | 54 void addSourceUnsafeEval(); |
| 55 void addSourceUnsafeDynamic(); | 55 void addSourceStrictDynamic(); |
| 56 void addSourceUnsafeHashedAttributes(); | 56 void addSourceUnsafeHashedAttributes(); |
| 57 void addSourceNonce(const String& nonce); | 57 void addSourceNonce(const String& nonce); |
| 58 void addSourceHash(const ContentSecurityPolicyHashAlgorithm&, const DigestVa
lue& hash); | 58 void addSourceHash(const ContentSecurityPolicyHashAlgorithm&, const DigestVa
lue& hash); |
| 59 | 59 |
| 60 bool hasSourceMatchInList(const KURL&, ResourceRequest::RedirectStatus) cons
t; | 60 bool hasSourceMatchInList(const KURL&, ResourceRequest::RedirectStatus) cons
t; |
| 61 | 61 |
| 62 Member<ContentSecurityPolicy> m_policy; | 62 Member<ContentSecurityPolicy> m_policy; |
| 63 HeapVector<Member<CSPSource>> m_list; | 63 HeapVector<Member<CSPSource>> m_list; |
| 64 String m_directiveName; | 64 String m_directiveName; |
| 65 bool m_allowSelf; | 65 bool m_allowSelf; |
| 66 bool m_allowStar; | 66 bool m_allowStar; |
| 67 bool m_allowInline; | 67 bool m_allowInline; |
| 68 bool m_allowEval; | 68 bool m_allowEval; |
| 69 bool m_allowDynamic; | 69 bool m_allowDynamic; |
| 70 bool m_allowHashedAttributes; | 70 bool m_allowHashedAttributes; |
| 71 HashSet<String> m_nonces; | 71 HashSet<String> m_nonces; |
| 72 HashSet<CSPHashValue> m_hashes; | 72 HashSet<CSPHashValue> m_hashes; |
| 73 uint8_t m_hashAlgorithmsUsed; | 73 uint8_t m_hashAlgorithmsUsed; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif | 79 #endif |
| OLD | NEW |