| 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 CSPSource_h | 5 #ifndef CSPSource_h |
| 6 #define CSPSource_h | 6 #define CSPSource_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/frame/csp/ContentSecurityPolicy.h" | 9 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, IsSimilar); | 52 FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, IsSimilar); |
| 53 FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, Intersect); | 53 FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, Intersect); |
| 54 FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, IntersectSchemesOnly); | 54 FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, IntersectSchemesOnly); |
| 55 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources); | 55 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources); |
| 56 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, | 56 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, |
| 57 GetIntersectCSPSourcesSchemes); | 57 GetIntersectCSPSourcesSchemes); |
| 58 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector); | 58 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector); |
| 59 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType); | 59 FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType); |
| 60 FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, SubsumesWithSelf); |
| 60 | 61 |
| 61 bool schemeMatches(const String&) const; | 62 bool schemeMatches(const String&) const; |
| 62 bool hostMatches(const String&) const; | 63 bool hostMatches(const String&) const; |
| 63 bool pathMatches(const String&) const; | 64 bool pathMatches(const String&) const; |
| 64 // Protocol is necessary to determine default port if it is zero. | 65 // Protocol is necessary to determine default port if it is zero. |
| 65 bool portMatches(int port, const String& protocol) const; | 66 bool portMatches(int port, const String& protocol) const; |
| 66 bool isSimilar(CSPSource* other); | 67 bool isSimilar(CSPSource* other); |
| 67 | 68 |
| 68 Member<ContentSecurityPolicy> m_policy; | 69 Member<ContentSecurityPolicy> m_policy; |
| 69 String m_scheme; | 70 String m_scheme; |
| 70 String m_host; | 71 String m_host; |
| 71 int m_port; | 72 int m_port; |
| 72 String m_path; | 73 String m_path; |
| 73 | 74 |
| 74 WildcardDisposition m_hostWildcard; | 75 WildcardDisposition m_hostWildcard; |
| 75 WildcardDisposition m_portWildcard; | 76 WildcardDisposition m_portWildcard; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace blink | 79 } // namespace blink |
| 79 | 80 |
| 80 #endif | 81 #endif |
| OLD | NEW |