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

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

Issue 1390053002: Trace FrameTreeNode Snapshots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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.cc
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index 742b84782e2c6d9aa162283123632f97480b0815..11c83adc089615824e9f280dd7f2bb7ba9a9f287 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -16,6 +16,7 @@
#include "content/browser/frame_host/render_frame_host_factory.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/frame_host/render_frame_proxy_host.h"
+#include "content/browser/frame_host/traced_frame_tree.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/common/site_isolation_policy.h"
@@ -207,6 +208,7 @@ RenderFrameHostImpl* FrameTree::AddFrame(FrameTreeNode* parent,
FrameTreeNode* node_ptr = node.get();
// AddChild is what creates the RenderFrameHost.
parent->AddChild(node.Pass(), process_id, new_routing_id);
+ TraceSnapshot();
return node_ptr->current_frame_host();
}
@@ -218,6 +220,7 @@ void FrameTree::RemoveFrame(FrameTreeNode* child) {
}
parent->RemoveChild(child);
+ TraceSnapshot();
}
void FrameTree::CreateProxiesForSiteInstance(
@@ -411,4 +414,10 @@ bool FrameTree::IsLoading() {
return is_loading;
}
+void FrameTree::TraceSnapshot() const {
+ TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("navigation", "FrameTree", this,
+ scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
+ TracedFrameTree::Create(*this)));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698