| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 bool isHashOrNoncePresent() const; | 46 bool isHashOrNoncePresent() const; |
| 47 uint8_t hashAlgorithmsUsed() const; | 47 uint8_t hashAlgorithmsUsed() const; |
| 48 // The algorothm is described more extensively here: | 48 // The algorothm is described more extensively here: |
| 49 // https://w3c.github.io/webappsec-csp/embedded/#subsume-source-list | 49 // https://w3c.github.io/webappsec-csp/embedded/#subsume-source-list |
| 50 bool subsumes(HeapVector<Member<SourceListDirective>>); | 50 bool subsumes(HeapVector<Member<SourceListDirective>>); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources); | 53 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources); |
| 54 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, | 54 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, |
| 55 GetIntersectCSPSourcesSchemes); | 55 GetIntersectCSPSourcesSchemes); |
| 56 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector); |
| 57 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType); |
| 56 | 58 |
| 57 bool parseSource(const UChar* begin, | 59 bool parseSource(const UChar* begin, |
| 58 const UChar* end, | 60 const UChar* end, |
| 59 String& scheme, | 61 String& scheme, |
| 60 String& host, | 62 String& host, |
| 61 int& port, | 63 int& port, |
| 62 String& path, | 64 String& path, |
| 63 CSPSource::WildcardDisposition&, | 65 CSPSource::WildcardDisposition&, |
| 64 CSPSource::WildcardDisposition&); | 66 CSPSource::WildcardDisposition&); |
| 65 bool parseScheme(const UChar* begin, const UChar* end, String& scheme); | 67 bool parseScheme(const UChar* begin, const UChar* end, String& scheme); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool m_allowDynamic; | 108 bool m_allowDynamic; |
| 107 bool m_allowHashedAttributes; | 109 bool m_allowHashedAttributes; |
| 108 HashSet<String> m_nonces; | 110 HashSet<String> m_nonces; |
| 109 HashSet<CSPHashValue> m_hashes; | 111 HashSet<CSPHashValue> m_hashes; |
| 110 uint8_t m_hashAlgorithmsUsed; | 112 uint8_t m_hashAlgorithmsUsed; |
| 111 }; | 113 }; |
| 112 | 114 |
| 113 } // namespace blink | 115 } // namespace blink |
| 114 | 116 |
| 115 #endif | 117 #endif |
| OLD | NEW |