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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPSource.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/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 3a4739cfccbbd2ca18d7efd6703940dda2e81cdb..33ae85f44c078ab6ea153c4ea7574cad62b6a58a 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.h
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.h
@@ -36,15 +36,15 @@ class CORE_EXPORT CSPSource : public GarbageCollectedFinalized<CSPSource> {
// Returns true if this CSPSource subsumes the other, as defined by the
// algorithm at https://w3c.github.io/webappsec-csp/embedded/#subsume-policy
- bool subsumes(CSPSource*);
+ bool subsumes(CSPSource*) const;
// Retrieve the most restrictive information from the two CSPSources if
// isSimilar is true for the two. Otherwise, return nullptr.
- CSPSource* intersect(CSPSource*);
+ CSPSource* intersect(CSPSource*) const;
// Returns true if the first list subsumes the second, as defined by the
// algorithm at
// https://w3c.github.io/webappsec-csp/embedded/#subsume-source-list
- static bool firstSubsumesSecond(HeapVector<Member<CSPSource>>,
- HeapVector<Member<CSPSource>>);
+ static bool firstSubsumesSecond(const HeapVector<Member<CSPSource>>&,
+ const HeapVector<Member<CSPSource>>&);
DECLARE_TRACE();
@@ -64,7 +64,7 @@ class CORE_EXPORT CSPSource : public GarbageCollectedFinalized<CSPSource> {
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 isSimilar(CSPSource* other);
+ bool isSimilar(CSPSource* other) const;
Member<ContentSecurityPolicy> m_policy;
String m_scheme;
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp ('k') | third_party/WebKit/Source/core/frame/csp/CSPSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698