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

Side by Side Diff: content/common/content_security_policy/csp_policy.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 <sstream> 5 #include <sstream>
6 #include "base/strings/string_split.h" 6 #include "base/strings/string_split.h"
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "content/common/content_security_policy/csp_context.h" 8 #include "content/common/content_security_policy/csp_context.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 if (directive.name != directive_name) 137 if (directive.name != directive_name)
138 message << " Note that '" << CSPDirective::NameToString(directive_name) 138 message << " Note that '" << CSPDirective::NameToString(directive_name)
139 << "' was not explicitly set, so '" 139 << "' was not explicitly set, so '"
140 << CSPDirective::NameToString(directive.name) 140 << CSPDirective::NameToString(directive.name)
141 << "' is used as a fallback."; 141 << "' is used as a fallback.";
142 142
143 message << "\n"; 143 message << "\n";
144 144
145 context->LogToConsole(message.str()); 145 context->LogToConsole(message.str());
146 context->ReportViolation(CSPDirective::NameToString(directive.name), 146 context->ReportViolation(
147 CSPDirective::NameToString(directive_name), 147 CSPViolationParams(CSPDirective::NameToString(directive.name),
148 message.str(), url, report_endpoints, 148 CSPDirective::NameToString(directive_name),
149 // TODO(arthursonzogni): consider passing the 149 message.str(), url, report_endpoints,
150 // original header 150 // TODO(arthursonzogni): consider passing the
151 "", disposition); 151 // original header
152 "", disposition));
152 } 153 }
153 154
154 } // namespace content 155 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698