Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Unified Diff: third_party/WebKit/Source/core/frame/csp/SourceListDirective.h

Issue 2545063002: Part 3.6: Is policy list subsumed under subsuming policy? (Closed)
Patch Set: Intersect Tests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
index fd4aa3117d3037759a0b9d29814e2172e6a67a8e..1deedac24a3d4db7d38357401a1038340a9b3bde 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
@@ -56,6 +56,8 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources);
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest,
GetIntersectCSPSourcesSchemes);
+ FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectNonces);
+ FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectHashes);
FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector);
FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType);
@@ -96,10 +98,14 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
static void addSourceToMap(HashMap<String, CSPSource*>&, CSPSource*);
bool hasSourceMatchInList(const KURL&, ResourceRequest::RedirectStatus) const;
+ HashSet<String> getIntersectNonces(const HashSet<String>& other);
+ HashSet<CSPHashValue> getIntersectHashes(const HashSet<CSPHashValue>& other);
HeapVector<Member<CSPSource>> getIntersectCSPSources(
HeapVector<Member<CSPSource>> other);
HashMap<String, CSPSource*> getIntersectSchemesOnly(
HeapVector<Member<CSPSource>> other);
+ bool subsumesNoncesAndHashes(const HashSet<String>& nonces,
+ const HashSet<CSPHashValue> hashes);
Member<ContentSecurityPolicy> m_policy;
HeapVector<Member<CSPSource>> m_list;

Powered by Google App Engine
This is Rietveld 408576698