Index: third_party/WebKit/Source/core/frame/csp/CSPSource.h |
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.h b/third_party/WebKit/Source/core/frame/csp/CSPSource.h |
index 63e9cae422f94b43bb086747f19a0d9d10633831..632db2721d038d247da3eaf46a65777b3884fd0e 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.h |
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.h |
@@ -28,6 +28,8 @@ class CORE_EXPORT CSPSource : public GarbageCollectedFinalized<CSPSource> { |
const String& path, |
WildcardDisposition hostWildcard, |
WildcardDisposition portWildcard); |
+ bool isSchemeOnly() const; |
+ const String& getScheme() { return m_scheme; }; |
bool matches(const KURL&, |
ResourceRequest::RedirectStatus = |
ResourceRequest::RedirectStatus::NoRedirect) const; |
@@ -38,19 +40,23 @@ class CORE_EXPORT CSPSource : public GarbageCollectedFinalized<CSPSource> { |
// Retrieve the most restrictive information from the two CSPSources if |
// isSimilar is true for the two. Otherwise, return nullptr. |
CSPSource* intersect(CSPSource*); |
+ void addToMap(HashMap<String, CSPSource*>&); |
amalika
2016/11/19 18:34:32
Would it be better if I change it to be a lambda f
Mike West
2016/11/23 09:19:18
I think you can just stuff it into `SourceListDire
amalika
2016/11/24 14:50:32
perfect! addressed.
|
DECLARE_TRACE(); |
private: |
FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, IsSimilar); |
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources); |
+ FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, |
+ GetIntersectCSPSourcesSchemes); |
+ FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, Intersect); |
+ FRIEND_TEST_ALL_PREFIXES(CSPSourceTest, IntersectSchemesOnly); |
bool schemeMatches(const String&) const; |
bool hostMatches(const String&) const; |
bool pathMatches(const String&) const; |
// Protocol is necessary to determine default port if it is zero. |
bool portMatches(int port, const String& protocol) const; |
- bool isSchemeOnly() const; |
bool isSimilar(CSPSource* other); |
Member<ContentSecurityPolicy> m_policy; |