Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_manager.cc |
| diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc |
| index 5ae522b0a7b448c1cf8ab395d06544110703e08e..4b8a137a22b443e4bfd9b5cef36dc27675c3d43a 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -435,9 +435,9 @@ void RenderFrameHostManager::DidNavigateFrame( |
| bool was_caused_by_user_gesture) { |
| CommitPendingIfNecessary(render_frame_host, was_caused_by_user_gesture); |
| - // Make sure any dynamic changes to this frame's sandbox flags that were made |
| - // prior to navigation take effect. |
| - CommitPendingSandboxFlags(); |
| + // Make sure any dynamic changes to this frame's sandbox flags and feature |
| + // policy that were made prior to navigation take effect. |
| + CommitPendingFramePolicy(); |
| } |
| void RenderFrameHostManager::CommitPendingIfNecessary( |
| @@ -537,23 +537,24 @@ void RenderFrameHostManager::DidChangeOpener( |
| } |
| } |
| -void RenderFrameHostManager::CommitPendingSandboxFlags() { |
| +void RenderFrameHostManager::CommitPendingFramePolicy() { |
| // Return early if there were no pending sandbox flags updates. |
|
lunalu1
2017/04/05 22:30:03
nit: update the comment
iclelland
2017/04/09 03:25:54
Done.
|
| - if (!frame_tree_node_->CommitPendingSandboxFlags()) |
| + if (!frame_tree_node_->CommitPendingFramePolicy()) |
| return; |
| - // Sandbox flags updates can only happen when the frame has a parent. |
| + // Policy updates can only happen when the frame has a parent. |
| CHECK(frame_tree_node_->parent()); |
| - // Notify all of the frame's proxies about updated sandbox flags, excluding |
| - // the parent process since it already knows the latest flags. |
| + // Notify all of the frame's proxies about updated policies, excluding |
| + // the parent process since it already knows the latest state. |
| SiteInstance* parent_site_instance = |
| frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
| for (const auto& pair : proxy_hosts_) { |
| if (pair.second->GetSiteInstance() != parent_site_instance) { |
| - pair.second->Send(new FrameMsg_DidUpdateSandboxFlags( |
| + pair.second->Send(new FrameMsg_DidUpdateFramePolicy( |
| pair.second->GetRoutingID(), |
| - frame_tree_node_->current_replication_state().sandbox_flags)); |
| + frame_tree_node_->current_replication_state().sandbox_flags, |
| + frame_tree_node_->current_replication_state().container_policy)); |
| } |
| } |
| } |