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

Unified Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index 7dac8076e47fcb52e1491eda7d1ce06e64c71309..cf0b08611927628b7e6720a8a10e3caac04e4391 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -511,7 +511,8 @@ NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(
NavigationPolicy policy,
bool replacesCurrentHistoryItem,
bool isClientRedirect,
- HTMLFormElement* form) {
+ HTMLFormElement* form,
+ ContentSecurityPolicyDisposition shouldBypassMainWorldCSP) {
if (!m_webFrame->client())
return NavigationPolicyIgnore;
@@ -548,6 +549,8 @@ NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(
navigationInfo.isHistoryNavigationInNewChildFrame =
isHistoryNavigationInNewChildFrame;
navigationInfo.isClientRedirect = isClientRedirect;
+ navigationInfo.shouldBypassMainWorldCSP =
+ shouldBypassMainWorldCSP == DoNotCheckContentSecurityPolicy;
// Caching could be disabled for requests initiated by DevTools.
// TODO(ananta)
// We should extract the network cache state into a global component which

Powered by Google App Engine
This is Rietveld 408576698