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

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

Issue 2532913002: Unreverting Embedding-CSP: Refactoring directive strings into enum. (Closed)
Patch Set: Created 4 years, 1 month 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/ContentSecurityPolicyTest.cpp ('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 5af409b81c582e13e57b728067dd582192cc63c2..ef1173ec484a40c2ddcbbae85883cd3c2fd0a46b 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -141,7 +141,8 @@ void SourceListDirective::parse(const UChar* begin, const UChar* end) {
// list itself.
if (scheme.isEmpty() && host.isEmpty())
continue;
- if (m_policy->isDirectiveName(host))
+ if (ContentSecurityPolicy::getDirectiveType(host) !=
+ ContentSecurityPolicy::DirectiveType::Undefined)
m_policy->reportDirectiveAsSourceExpression(m_directiveName, host);
m_list.append(new CSPSource(m_policy, scheme, host, port, path,
hostWildcard, portWildcard));
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698