| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/content_security_policy/csp_context.h" | 5 #include "content/common/content_security_policy/csp_context.h" |
| 6 | 6 |
| 7 namespace content { | 7 namespace content { |
| 8 | 8 |
| 9 CSPContext::CSPContext() : has_self_(false) {} | 9 CSPContext::CSPContext() : has_self_(false) {} |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 const std::string& CSPContext::GetSelfScheme() { | 61 const std::string& CSPContext::GetSelfScheme() { |
| 62 return self_scheme_; | 62 return self_scheme_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool CSPContext::SchemeShouldBypassCSP(const base::StringPiece& scheme) { | 65 bool CSPContext::SchemeShouldBypassCSP(const base::StringPiece& scheme) { |
| 66 return false; | 66 return false; |
| 67 } | 67 } |
| 68 | 68 |
| 69 void CSPContext::SanitizeDataForUseInCspViolation( |
| 70 bool is_redirect, |
| 71 CSPDirective::Name directive, |
| 72 GURL* blocked_url, |
| 73 SourceLocation* source_location) const { |
| 74 return; |
| 75 } |
| 76 |
| 69 bool CSPContext::SelfSchemeShouldBypassCsp() { | 77 bool CSPContext::SelfSchemeShouldBypassCsp() { |
| 70 if (!has_self_) | 78 if (!has_self_) |
| 71 return false; | 79 return false; |
| 72 return SchemeShouldBypassCSP(self_scheme_); | 80 return SchemeShouldBypassCSP(self_scheme_); |
| 73 } | 81 } |
| 74 | 82 |
| 75 void CSPContext::ReportContentSecurityPolicyViolation( | 83 void CSPContext::ReportContentSecurityPolicyViolation( |
| 76 const CSPViolationParams& violation_params) { | 84 const CSPViolationParams& violation_params) { |
| 77 return; | 85 return; |
| 78 } | 86 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 98 disposition(disposition), | 106 disposition(disposition), |
| 99 after_redirect(after_redirect), | 107 after_redirect(after_redirect), |
| 100 source_location(source_location) {} | 108 source_location(source_location) {} |
| 101 | 109 |
| 102 CSPViolationParams::CSPViolationParams(const CSPViolationParams& other) = | 110 CSPViolationParams::CSPViolationParams(const CSPViolationParams& other) = |
| 103 default; | 111 default; |
| 104 | 112 |
| 105 CSPViolationParams::~CSPViolationParams() {} | 113 CSPViolationParams::~CSPViolationParams() {} |
| 106 | 114 |
| 107 } // namespace content | 115 } // namespace content |
| OLD | NEW |