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

Unified Diff: Source/core/frame/csp/CSPSourceList.cpp

Issue 220343005: CSP: Ship hash and nonce expressions, and the 'frame-ancestors' directive. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/CSPSourceList.cpp
diff --git a/Source/core/frame/csp/CSPSourceList.cpp b/Source/core/frame/csp/CSPSourceList.cpp
index a17c5bb73cf9fdd8855017d62f68db8d6b09fdd0..49007c30edeb0cf45944dd0d1bae3f1fd4d46848 100644
--- a/Source/core/frame/csp/CSPSourceList.cpp
+++ b/Source/core/frame/csp/CSPSourceList.cpp
@@ -187,25 +187,23 @@ bool CSPSourceList::parseSource(const UChar* begin, const UChar* end, String& sc
return true;
}
- if (m_policy->experimentalFeaturesEnabled()) {
- String nonce;
- if (!parseNonce(begin, end, nonce))
- return false;
+ String nonce;
+ if (!parseNonce(begin, end, nonce))
+ return false;
- if (!nonce.isNull()) {
- addSourceNonce(nonce);
- return true;
- }
+ if (!nonce.isNull()) {
+ addSourceNonce(nonce);
+ return true;
+ }
- DigestValue hash;
- ContentSecurityPolicyHashAlgorithm algorithm = ContentSecurityPolicyHashAlgorithmNone;
- if (!parseHash(begin, end, hash, algorithm))
- return false;
+ DigestValue hash;
+ ContentSecurityPolicyHashAlgorithm algorithm = ContentSecurityPolicyHashAlgorithmNone;
+ if (!parseHash(begin, end, hash, algorithm))
+ return false;
- if (hash.size() > 0) {
- addSourceHash(algorithm, hash);
- return true;
- }
+ if (hash.size() > 0) {
+ addSourceHash(algorithm, hash);
+ return true;
}
const UChar* position = begin;
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698