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

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

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Cleanup, reponding to 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
Index: content/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index b4a59ffafaac70e5f6c79b6203cc43f039a8f715..a17f8c90346342047adba259d13adc68e3a64855 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -321,6 +321,11 @@ void FrameTreeNode::SetPendingSandboxFlags(
pending_sandbox_flags_ |= parent()->effective_sandbox_flags();
}
+void FrameTreeNode::SetPendingContainerPolicy(
+ const ParsedFeaturePolicyHeader& container_policy) {
+ pending_container_policy_ = container_policy;
+}
+
bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const {
if (!other || !other->child_count())
return false;
@@ -364,10 +369,12 @@ bool FrameTreeNode::IsLoading() const {
return current_frame_host->is_loading();
}
-bool FrameTreeNode::CommitPendingSandboxFlags() {
+bool FrameTreeNode::CommitPendingFramePolicy() {
bool did_change_flags =
lunalu1 2017/04/05 22:30:03 nit: s/did_change_flags/did_change_frame_policy/
iclelland 2017/04/09 03:25:54 Separated into two appropriately-named flags inste
- pending_sandbox_flags_ != replication_state_.sandbox_flags;
+ pending_sandbox_flags_ != replication_state_.sandbox_flags ||
+ pending_container_policy_ != replication_state_.container_policy;
lunalu1 2017/04/05 22:30:03 container policy is a white-list (WebVector<WebPar
iclelland 2017/04/11 17:41:43 We don't need to, in that case, but in practice th
replication_state_.sandbox_flags = pending_sandbox_flags_;
lunalu1 2017/04/05 22:30:03 We don't need to reassign the value, unless the va
iclelland 2017/04/09 03:25:54 Done.
+ replication_state_.container_policy = pending_container_policy_;
return did_change_flags;
}

Powered by Google App Engine
This is Rietveld 408576698