 Chromium Code Reviews
 Chromium Code Reviews Issue 2797813002:
  Replicate feature policy container policies.  (Closed)
    
  
    Issue 2797813002:
  Replicate feature policy container policies.  (Closed) 
  | 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 48bc7137a28d3d1ac05ad886dad4fc2da386a0a0..edd5f2af25b911992464072b6b99c428c7e7cd36 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); | 
| @@ -206,7 +207,8 @@ bool FrameTree::AddFrame(FrameTreeNode* parent, | 
| // Set sandbox flags and make them effective immediately, since initial | 
| 
lunalu1
2017/04/05 22:30:03
nit: update the comment so that it reflects on bot
 
iclelland
2017/04/09 03:25:54
Done.
 | 
| // sandbox flags should apply to the initial empty document in the frame. | 
| added_node->SetPendingSandboxFlags(sandbox_flags); | 
| - added_node->CommitPendingSandboxFlags(); | 
| + added_node->SetPendingContainerPolicy(container_policy); | 
| 
alexmos
2017/04/06 00:44:22
If we're combining the commit step, perhaps it als
 
iclelland
2017/04/09 03:25:54
I hadn't done this; SetPendingSandboxFlags is also
 
alexmos
2017/04/11 01:17:49
Ack.  I was thinking you could pass in an empty po
 | 
| + 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 |