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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h

Issue 2421473004: CSP: Fire 'SecurityPolicyViolation' on the offending element. (Closed)
Patch Set: Test. Created 4 years, 2 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/CSPDirectiveList.h
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
index 8c70a10fe33d26d09bbccad14ff762ac8b9e05a9..7d017f855aa00838dea157f1472436b849ce9d0d 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
@@ -42,19 +42,22 @@ class CORE_EXPORT CSPDirectiveList
return m_headerSource;
}
- bool allowJavaScriptURLs(const String& contextURL,
+ bool allowJavaScriptURLs(Element*,
+ const String& contextURL,
const WTF::OrdinalNumber& contextLine,
ContentSecurityPolicy::ReportingStatus) const;
- bool allowInlineEventHandlers(const String& contextURL,
+ bool allowInlineEventHandlers(Element*,
+ const String& contextURL,
const WTF::OrdinalNumber& contextLine,
ContentSecurityPolicy::ReportingStatus) const;
- bool allowInlineScript(const String& contextURL,
+ bool allowInlineScript(Element*,
+ const String& contextURL,
const String& nonce,
- ParserDisposition,
const WTF::OrdinalNumber& contextLine,
ContentSecurityPolicy::ReportingStatus,
const String& scriptContent) const;
- bool allowInlineStyle(const String& contextURL,
+ bool allowInlineStyle(Element*,
+ const String& contextURL,
const String& nonce,
const WTF::OrdinalNumber& contextLine,
ContentSecurityPolicy::ReportingStatus,
@@ -210,7 +213,8 @@ class CORE_EXPORT CSPDirectiveList
const String& consoleMessage,
const KURL& blockedURL,
const String& contextURL,
- const WTF::OrdinalNumber& contextLine) const;
+ const WTF::OrdinalNumber& contextLine,
+ Element*) const;
void reportViolationWithState(
const String& directiveText,
const String& effectiveDirective,
@@ -246,6 +250,7 @@ class CORE_EXPORT CSPDirectiveList
ContentSecurityPolicy::WillNotThrowException) const;
bool checkInlineAndReportViolation(SourceListDirective*,
const String& consoleMessage,
+ Element*,
const String& contextURL,
const WTF::OrdinalNumber& contextLine,
bool isScript,

Powered by Google App Engine
This is Rietveld 408576698