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

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

Issue 553423002: CSP: Use a specified frame for reporting 'frame-ancestors' violations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Feedback, tests, and rebase. Created 6 years, 3 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: Source/core/frame/csp/CSPDirectiveList.h
diff --git a/Source/core/frame/csp/CSPDirectiveList.h b/Source/core/frame/csp/CSPDirectiveList.h
index 37d8fce3b1dc52f8a1c9afe2be6559bece56bf10..8ba6b8d54b07befd4c61bc3118112eb9eb86459c 100644
--- a/Source/core/frame/csp/CSPDirectiveList.h
+++ b/Source/core/frame/csp/CSPDirectiveList.h
@@ -49,7 +49,7 @@ public:
bool allowConnectToSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
bool allowFormAction(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
bool allowBaseURI(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
- bool allowAncestors(LocalFrame*, ContentSecurityPolicy::ReportingStatus) const;
+ bool allowAncestors(LocalFrame*, const KURL&, ContentSecurityPolicy::ReportingStatus) const;
bool allowChildContextFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
bool allowScriptNonce(const String&) const;
bool allowStyleNonce(const String&) const;
@@ -80,6 +80,7 @@ private:
SourceListDirective* operativeDirective(SourceListDirective*) const;
SourceListDirective* operativeDirective(SourceListDirective*, SourceListDirective* override) const;
void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL) const;
+ void reportViolationWithFrame(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, LocalFrame*) const;
void reportViolationWithLocation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const String& contextURL, const WTF::OrdinalNumber& contextLine) const;
void reportViolationWithState(const String& directiveText, const String& effectiveDirective, const String& message, const KURL& blockedURL, ScriptState*) const;
@@ -98,7 +99,7 @@ private:
bool checkSourceAndReportViolation(SourceListDirective*, const KURL&, const String& effectiveDirective) const;
bool checkMediaTypeAndReportViolation(MediaListDirective*, const String& type, const String& typeAttribute, const String& consoleMessage) const;
- bool checkAncestorsAndReportViolation(SourceListDirective*, LocalFrame*) const;
+ bool checkAncestorsAndReportViolation(SourceListDirective*, LocalFrame*, const KURL&) const;
bool denyIfEnforcingPolicy() const { return m_reportOnly; }

Powered by Google App Engine
This is Rietveld 408576698