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

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

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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.h ('k') | content/browser/frame_host/frame_tree_node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree.cc
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index e10bb46f6e2e3f97448b87bb9c6845380baa8bf5..c22f24bb22d2525d984460aac9da25200f1db8ab 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -176,6 +176,7 @@ bool FrameTree::AddFrame(FrameTreeNode* parent,
const std::string& frame_name,
const std::string& frame_unique_name,
blink::WebSandboxFlags sandbox_flags,
+ const ParsedFeaturePolicyHeader& container_policy,
const FrameOwnerProperties& frame_owner_properties) {
CHECK_NE(new_routing_id, MSG_ROUTING_NONE);
@@ -203,10 +204,12 @@ bool FrameTree::AddFrame(FrameTreeNode* parent,
if (last_committed_entry)
last_committed_entry->ClearStaleFrameEntriesForNewFrame(added_node);
- // Set sandbox flags and make them effective immediately, since initial
- // sandbox flags should apply to the initial empty document in the frame.
+ // Set sandbox flags and container policy and make them effective immediately,
+ // since initial sandbox flags and feature policy should apply to the initial
+ // empty document in the frame.
added_node->SetPendingSandboxFlags(sandbox_flags);
- added_node->CommitPendingSandboxFlags();
+ added_node->SetPendingContainerPolicy(container_policy);
+ added_node->CommitPendingFramePolicy();
// Now that the new node is part of the FrameTree and has a RenderFrameHost,
// we can announce the creation of the initial RenderFrame which already
« no previous file with comments | « content/browser/frame_host/frame_tree.h ('k') | content/browser/frame_host/frame_tree_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698