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

Unified Diff: content/browser/frame_host/ancestor_throttle.cc

Issue 2761153003: PlzNavigate & CSP. Use the SourceLocation in violation reports. (Closed)
Patch Set: Nit. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/form_submission_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/ancestor_throttle.cc
diff --git a/content/browser/frame_host/ancestor_throttle.cc b/content/browser/frame_host/ancestor_throttle.cc
index cba286784a2e914a9f35e79578900da220198d10..d1e685b21e018115181af96dbed6eda4d0b82214 100644
--- a/content/browser/frame_host/ancestor_throttle.cc
+++ b/content/browser/frame_host/ancestor_throttle.cc
@@ -189,10 +189,12 @@ AncestorThrottle::CheckContentSecurityPolicyFrameSrc(bool is_redirect) {
RenderFrameHostImpl* parent = parent_ftn->current_frame_host();
DCHECK(parent);
- if (!parent->IsAllowedByCsp(CSPDirective::FrameSrc, url, is_redirect))
- return NavigationThrottle::BLOCK_REQUEST;
+ if (parent->EnforceCsp(CSPDirective::FrameSrc, url, is_redirect,
arthursonzogni 2017/03/21 16:20:38 While I added the SourceLocation argument to this
Mike West 2017/03/22 08:57:38 It seems odd to diverge from Blink's implementatio
arthursonzogni 2017/03/22 09:38:35 Okay, let's do this!
+ handle->source_location())) {
+ return NavigationThrottle::PROCEED;
+ }
- return NavigationThrottle::PROCEED;
+ return NavigationThrottle::BLOCK_REQUEST;
}
NavigationThrottle::ThrottleCheckResult AncestorThrottle::WillStartRequest() {
« no previous file with comments | « no previous file | content/browser/frame_host/form_submission_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698