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

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

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
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/SourceListDirective.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
index c6784bf0fb9425373c64ca04faf2123a86c57539..49ae246d0370fc6aeb24bd68aef1d7061c28d1b2 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -586,7 +586,7 @@ bool SourceListDirective::hasSourceMatchInList(
return false;
}
-bool SourceListDirective::allowAllInline() {
+bool SourceListDirective::allowAllInline() const {
const ContentSecurityPolicy::DirectiveType& type =
ContentSecurityPolicy::getDirectiveType(m_directiveName);
if (type != ContentSecurityPolicy::DirectiveType::DefaultSrc &&
@@ -600,7 +600,7 @@ bool SourceListDirective::allowAllInline() {
}
bool SourceListDirective::subsumes(
- HeapVector<Member<SourceListDirective>> other) {
+ const HeapVector<Member<SourceListDirective>>& other) const {
// TODO(amalika): Handle here special keywords.
if (!other.size() || other[0]->isNone())
return other.size();
@@ -651,7 +651,7 @@ bool SourceListDirective::subsumes(
HeapHashMap<String, Member<CSPSource>>
SourceListDirective::getIntersectSchemesOnly(
- HeapVector<Member<CSPSource>> other) {
+ const HeapVector<Member<CSPSource>>& other) const {
HeapHashMap<String, Member<CSPSource>> schemesA;
for (const auto& sourceA : m_list) {
if (sourceA->isSchemeOnly())
@@ -675,7 +675,7 @@ SourceListDirective::getIntersectSchemesOnly(
}
HeapVector<Member<CSPSource>> SourceListDirective::getIntersectCSPSources(
- HeapVector<Member<CSPSource>> other) {
+ const HeapVector<Member<CSPSource>>& other) const {
auto schemesMap = getIntersectSchemesOnly(other);
HeapVector<Member<CSPSource>> normalized;
// Add all normalized scheme source expressions.
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/SourceListDirective.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698