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

Unified Diff: Source/core/frame/csp/ContentSecurityPolicy.h

Issue 353873003: Clean up usage of CSP functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix to apply Created 6 years, 6 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/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.h
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.h b/Source/core/frame/csp/ContentSecurityPolicy.h
index c6a919c5f2096c540c6296f64425d00e93fd912d..c6c303041ce0bd76d580eaece50bd05bb675385d 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -126,10 +126,14 @@ public:
// The nonce and hash allow functions are guaranteed to not have any side
// effects, including reporting.
- bool allowScriptNonce(const String& nonce) const;
- bool allowStyleNonce(const String& nonce) const;
- bool allowScriptHash(const String& source) const;
- bool allowStyleHash(const String& source) const;
+ // Nonce/Hash functions check all policies relating to use of a script/style
+ // with the given nonce/hash and return true all CSP policies allow it.
+ // If these return true, callers can then process the content or
+ // issue a load and be safe disabling any further CSP checks.
+ bool allowScriptWithNonce(const String& nonce) const;
+ bool allowStyleWithNonce(const String& nonce) const;
+ bool allowScriptWithHash(const String& source) const;
+ bool allowStyleWithHash(const String& source) const;
void usesScriptHashAlgorithms(uint8_t ContentSecurityPolicyHashAlgorithm);
void usesStyleHashAlgorithms(uint8_t ContentSecurityPolicyHashAlgorithm);
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698