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

Side by Side 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 unified diff | Download patch
OLDNEW
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 #include "content/common/content_security_policy/csp_policy.h" 6 #include "content/common/content_security_policy/csp_policy.h"
7 7
8 namespace content { 8 namespace content {
9 9
10 CSPContext::CSPContext() 10 CSPContext::CSPContext()
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 bool CSPContext::SchemeShouldBypassCSP(const base::StringPiece& scheme) { 69 bool CSPContext::SchemeShouldBypassCSP(const base::StringPiece& scheme) {
70 return false; 70 return false;
71 } 71 }
72 72
73 bool CSPContext::SelfSchemeShouldBypassCSP() { 73 bool CSPContext::SelfSchemeShouldBypassCSP() {
74 if (!has_self_) 74 if (!has_self_)
75 return false; 75 return false;
76 return SchemeShouldBypassCSP(self_scheme_); 76 return SchemeShouldBypassCSP(self_scheme_);
77 } 77 }
78 78
79 void CSPContext::ReportViolation( 79 void CSPContext::ReportViolation(const CSPViolationParams& violation_params) {
80 const std::string& directive_text,
81 const std::string& effective_directive,
82 const std::string& message,
83 const GURL& blocked_url,
84 const std::vector<std::string>& report_end_points,
85 const std::string& header,
86 blink::WebContentSecurityPolicyType disposition) {
87 return; 80 return;
88 } 81 }
89 82
83 CSPViolationParams::CSPViolationParams() = default;
84
85 CSPViolationParams::CSPViolationParams(
86 const std::string& directive,
87 const std::string& effective_directive,
88 const std::string& console_message,
89 const GURL& blocked_url,
90 const std::vector<std::string>& report_endpoints,
91 const std::string& header,
92 const blink::WebContentSecurityPolicyType& disposition,
93 bool followed_redirect)
94 : directive(directive),
95 effective_directive(effective_directive),
96 console_message(console_message),
97 blocked_url(blocked_url),
98 report_endpoints(report_endpoints),
99 header(header),
100 disposition(disposition),
101 followed_redirect(followed_redirect) {}
102
103 CSPViolationParams::CSPViolationParams(const CSPViolationParams& other) =
104 default;
105
106 CSPViolationParams::~CSPViolationParams() {}
107
90 } // namespace content 108 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698