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

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

Issue 1901023003: Introduce browser side FrameTreeNodeBlameContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove thread safety handling (and its doc) Created 4 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
« no previous file with comments | « content/browser/frame_host/traced_frame_tree_node.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/traced_frame_tree_node.cc
diff --git a/content/browser/frame_host/traced_frame_tree_node.cc b/content/browser/frame_host/traced_frame_tree_node.cc
deleted file mode 100644
index 702601115e5dc9ea7cc0eee03bd74f49d0fee82e..0000000000000000000000000000000000000000
--- a/content/browser/frame_host/traced_frame_tree_node.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/frame_host/traced_frame_tree_node.h"
-
-#include "base/command_line.h"
-#include "base/json/json_writer.h"
-#include "base/strings/stringprintf.h"
-#include "content/browser/frame_host/frame_tree.h"
-#include "content/public/common/content_switches.h"
-#include "url/gurl.h"
-
-namespace content {
-
-TracedFrameTreeNode::TracedFrameTreeNode(const FrameTreeNode& node)
- : parent_node_id_(-1),
- process_id_(-1),
- routing_id_(-1) {
- FrameTreeNode* parent = node.parent();
- if (parent)
- parent_node_id_ = parent->frame_tree_node_id();
-
- RenderFrameHostImpl* current_frame_host = node.current_frame_host();
-
- if (current_frame_host->last_committed_url().is_valid())
- url_ = current_frame_host->last_committed_url().spec();
-
- // On Windows, |rph->GetHandle()| does not duplicate ownership
- // of the process handle and the render host still retains it. Therefore, we
- // cannot create a base::Process object, which provides a proper way to get a
- // process id, from the handle. For a stopgap, we use this deprecated
- // function that does not require the ownership (http://crbug.com/417532).
- process_id_ = base::GetProcId(current_frame_host->GetProcess()->GetHandle());
-
- routing_id_ = current_frame_host->GetRoutingID();
- DCHECK_NE(routing_id_, MSG_ROUTING_NONE);
-}
-
-TracedFrameTreeNode::~TracedFrameTreeNode() {
-}
-
-void TracedFrameTreeNode::AppendAsTraceFormat(std::string* out) const {
- std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
-
- if (parent_node_id_ >= 0) {
- std::unique_ptr<base::DictionaryValue> ref(new base::DictionaryValue());
- ref->SetString("id_ref", base::StringPrintf("0x%x", parent_node_id_));
- ref->SetString("scope", "FrameTreeNode");
- value->Set("parent", std::move(ref));
- }
-
- if (process_id_ >= 0) {
- std::unique_ptr<base::DictionaryValue> ref(new base::DictionaryValue());
- ref->SetInteger("pid_ref", process_id_);
- ref->SetString("id_ref", base::StringPrintf("0x%x", routing_id_));
- ref->SetString("scope", "RenderFrame");
- value->Set("RenderFrame", std::move(ref));
- }
-
- if (!url_.empty())
- value->SetString("url", url_);
-
- std::string tmp;
- base::JSONWriter::Write(*value, &tmp);
- *out += tmp;
-}
-
-} // content
« no previous file with comments | « content/browser/frame_host/traced_frame_tree_node.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698