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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Nit. 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..a333354ae4fc2be3db1d90aab69219d9111f92b2 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -696,6 +696,17 @@ bool SourceListDirective::subsumes(
return CSPSource::firstSubsumesSecond(normalizedA, normalizedB);
}
+WebContentSecurityPolicySourceList SourceListDirective::expose() 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]->expose();
+ 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