| 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 3c3b0fe533f71b8f64712e4184fc5ef6ae82da97..3d3c9a01da198e9f5381f76ab2b90ba970fa2e87 100644
|
| --- a/content/common/content_security_policy/csp_context.cc
|
| +++ b/content/common/content_security_policy/csp_context.cc
|
| @@ -12,13 +12,14 @@ CSPContext::~CSPContext() {}
|
|
|
| bool CSPContext::IsAllowedByCsp(CSPDirective::Name directive_name,
|
| const GURL& url,
|
| - bool is_redirect) {
|
| + bool is_redirect,
|
| + const SourceLocation& source_location) {
|
| if (SchemeShouldBypassCSP(url.scheme_piece()))
|
| return true;
|
|
|
| for (const auto& policy : policies_) {
|
| - if (!ContentSecurityPolicy::Allow(policy, directive_name, url, this,
|
| - is_redirect))
|
| + if (!ContentSecurityPolicy::Allow(policy, directive_name, url, is_redirect,
|
| + this, source_location))
|
| return false;
|
| }
|
| return true;
|
| @@ -59,10 +60,6 @@ bool CSPContext::ProtocolMatchesSelf(const GURL& url) {
|
| return url.SchemeIs(self_scheme_);
|
| }
|
|
|
| -void CSPContext::LogToConsole(const std::string& message) {
|
| - return;
|
| -}
|
| -
|
| bool CSPContext::SchemeShouldBypassCSP(const base::StringPiece& scheme) {
|
| return false;
|
| }
|
| @@ -88,7 +85,8 @@ CSPViolationParams::CSPViolationParams(
|
| const std::vector<std::string>& report_endpoints,
|
| const std::string& header,
|
| const blink::WebContentSecurityPolicyType& disposition,
|
| - bool after_redirect)
|
| + bool after_redirect,
|
| + const SourceLocation& source_location)
|
| : directive(directive),
|
| effective_directive(effective_directive),
|
| console_message(console_message),
|
| @@ -96,7 +94,8 @@ CSPViolationParams::CSPViolationParams(
|
| report_endpoints(report_endpoints),
|
| header(header),
|
| disposition(disposition),
|
| - after_redirect(after_redirect) {}
|
| + after_redirect(after_redirect),
|
| + source_location(source_location) {}
|
|
|
| CSPViolationParams::CSPViolationParams(const CSPViolationParams& other) =
|
| default;
|
|
|