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

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

Issue 2655663004: Introduce content-side Feature Policy object and maintain in parallel with renderer policy. (Closed)
Patch Set: Add comments for public enum members 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
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 997805938531dd69285fc32763d94d83c67f1a6c..94204144d2e930e10952c2543e500bca6e9499af 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -618,7 +618,7 @@ void NavigatorImpl::DidNavigate(
// <meta> elements - we need to reset CSP and Feature Policy.
if (!is_navigation_within_page) {
render_frame_host->frame_tree_node()->ResetContentSecurityPolicy();
- render_frame_host->frame_tree_node()->ResetFeaturePolicy();
+ render_frame_host->frame_tree_node()->ResetFeaturePolicyHeader();
}
// When using --site-per-process, we notify the RFHM for all navigations,
@@ -688,6 +688,10 @@ void NavigatorImpl::DidNavigate(
if (!params.url_is_unreachable)
render_frame_host->set_last_successful_url(params.url);
+ // After setting the last committed origin, reset the feature policy in the
+ // RenderFrameHost to a blank policy based on the parent frame.
+ render_frame_host->ResetFeaturePolicy();
+
// Send notification about committed provisional loads. This notification is
// different from the NAV_ENTRY_COMMITTED notification which doesn't include
// the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations.
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698