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

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: Fix tests. 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::SchemeShouldBypass(const base::StringPiece& scheme) { 69 bool CSPContext::SchemeShouldBypass(const base::StringPiece& scheme) {
70 return false; 70 return false;
71 } 71 }
72 72
73 bool CSPContext::IsSelfBypassed() { 73 bool CSPContext::IsSelfBypassed() {
74 if (!has_self_) 74 if (!has_self_)
75 return false; 75 return false;
76 return SchemeShouldBypass(self_scheme_); 76 return SchemeShouldBypass(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 : directive(directive),
94 effective_directive(effective_directive),
95 console_message(console_message),
96 blocked_url(blocked_url),
97 report_endpoints(report_endpoints),
98 header(header),
99 disposition(disposition) {}
100
101 CSPViolationParams::CSPViolationParams(const CSPViolationParams& other) =
102 default;
103
104 CSPViolationParams::~CSPViolationParams() {}
105
90 } // namespace content 106 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698