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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Add the TODO and bug ids that was forgotten. Created 3 years, 10 months 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.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
index a39bd01757bc290cadd2c2d97c2aab3bd65965d3..c53f5b901e4756ae556f01fd316ae05e9a26ea58 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -696,6 +696,18 @@ bool SourceListDirective::subsumes(
return CSPSource::firstSubsumesSecond(normalizedA, normalizedB);
}
+WebContentSecurityPolicySourceList
+SourceListDirective::exposeForNavigationalChecks() const {
+ WebContentSecurityPolicySourceList sourceList;
+ sourceList.allowSelf = m_allowSelf;
+ sourceList.allowStar = m_allowStar;
+ WebVector<WebContentSecurityPolicySourceExpression> list(m_list.size());
+ for (size_t i = 0; i < m_list.size(); ++i)
+ list[i] = m_list[i]->exposeForNavigationalChecks();
+ sourceList.sources.swap(list);
+ return sourceList;
+}
+
bool SourceListDirective::subsumesNoncesAndHashes(
const HashSet<String>& nonces,
const HashSet<CSPHashValue> hashes) const {

Powered by Google App Engine
This is Rietveld 408576698