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

Unified Diff: content/common/content_security_policy/csp_context.cc

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Addressed comments(alexmos@ and nasko@) Created 3 years, 10 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: content/common/content_security_policy/csp_context.cc
diff --git a/content/common/content_security_policy/csp_context.cc b/content/common/content_security_policy/csp_context.cc
index b9a0f0301c3b6a1e4fdb929de436601e6dad1bb6..3bfed7ab790de2f67ae519a3e4ae6c6631e01fb5 100644
--- a/content/common/content_security_policy/csp_context.cc
+++ b/content/common/content_security_policy/csp_context.cc
@@ -76,15 +76,33 @@ bool CSPContext::SelfSchemeShouldBypassCSP() {
return SchemeShouldBypassCSP(self_scheme_);
}
-void CSPContext::ReportViolation(
- const std::string& directive_text,
+void CSPContext::ReportViolation(const CSPViolationParams& violation_params) {
+ return;
+}
+
+CSPViolationParams::CSPViolationParams() = default;
+
+CSPViolationParams::CSPViolationParams(
+ const std::string& directive,
const std::string& effective_directive,
- const std::string& message,
+ const std::string& console_message,
const GURL& blocked_url,
- const std::vector<std::string>& report_end_points,
+ const std::vector<std::string>& report_endpoints,
const std::string& header,
- blink::WebContentSecurityPolicyType disposition) {
- return;
-}
+ const blink::WebContentSecurityPolicyType& disposition,
+ bool followed_redirect)
+ : directive(directive),
+ effective_directive(effective_directive),
+ console_message(console_message),
+ blocked_url(blocked_url),
+ report_endpoints(report_endpoints),
+ header(header),
+ disposition(disposition),
+ followed_redirect(followed_redirect) {}
+
+CSPViolationParams::CSPViolationParams(const CSPViolationParams& other) =
+ default;
+
+CSPViolationParams::~CSPViolationParams() {}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698