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

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

Issue 2551843002: Embedding-CSP: Adding `const` to method signatures. (Closed)
Patch Set: Rebasing 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 aba6762151100fb05fed48a4d239e4af1c1b51ef..6a3bbd58a09897178dcb45bc8e92cb1a484fea46 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
@@ -46,11 +46,11 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
bool isNone() const;
bool isHashOrNoncePresent() const;
uint8_t hashAlgorithmsUsed() const;
- bool allowAllInline();
+ bool allowAllInline() const;
// The algorothm is described more extensively here:
// https://w3c.github.io/webappsec-csp/embedded/#subsume-source-list
- bool subsumes(HeapVector<Member<SourceListDirective>>);
+ bool subsumes(const HeapVector<Member<SourceListDirective>>&) const;
private:
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectCSPSources);
@@ -98,9 +98,9 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
bool hasSourceMatchInList(const KURL&, ResourceRequest::RedirectStatus) const;
HeapVector<Member<CSPSource>> getIntersectCSPSources(
- HeapVector<Member<CSPSource>> other);
+ const HeapVector<Member<CSPSource>>& other) const;
HeapHashMap<String, Member<CSPSource>> getIntersectSchemesOnly(
- HeapVector<Member<CSPSource>> other);
+ const HeapVector<Member<CSPSource>>& other) const;
Member<ContentSecurityPolicy> m_policy;
HeapVector<Member<CSPSource>> m_list;

Powered by Google App Engine
This is Rietveld 408576698