commit | 2e9c611139ee0c5f2c08410d775fa8243d95adff | [log] [tgz] |
---|---|---|
author | Arthur Sonzogni <[email protected]> | Mon May 02 08:37:13 2022 |
committer | Chromium LUCI CQ <[email protected]> | Mon May 02 08:37:13 2022 |
tree | 2f5dc4a2a0b86c4f8c56c2e20ce63b8870b85652 | |
parent | 5ba62a09b3abeaec50513b510c2c00abe7fd1a97 [diff] [blame] |
Add anonymous iframe WebFeature. This is required to setup an OriginTrial. [email protected] [email protected] Fixed: 1318042 Change-Id: Ibdc1775a93da44605ecb4ac6d0e38a8cbb77b8de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3616804 Reviewed-by: Antonio Sartori <[email protected]> Commit-Queue: Arthur Sonzogni <[email protected]> Cr-Commit-Position: refs/heads/main@{#998282}
diff --git a/content/browser/renderer_host/frame_tree_node.cc b/content/browser/renderer_host/frame_tree_node.cc index 9c3b109..aa65812 100644 --- a/content/browser/renderer_host/frame_tree_node.cc +++ b/content/browser/renderer_host/frame_tree_node.cc
@@ -501,6 +501,21 @@ } } +void FrameTreeNode::SetAnonymous(bool anonymous) { + if (anonymous) { + if (!parent_) { + bad_message::ReceivedBadMessage(current_frame_host()->GetProcess(), + bad_message::FTN_ANONYMOUS); + return; + } + + GetContentClient()->browser()->LogWebFeatureForCurrentPage( + parent_, blink::mojom::WebFeature::kAnonymousIframe); + } + + anonymous_ = anonymous; +} + bool FrameTreeNode::IsLoading() const { RenderFrameHostImpl* current_frame_host = render_manager_.current_frame_host();