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

Unified Diff: content/child/child_thread_impl.cc

Issue 2833873003: WIP: The tracing service prototype
Patch Set: sync Created 3 years, 7 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/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 4c231deda83f1e105563fbe824e2b7dd8ec2b451..03fcb39608ea3195111b229ca463120566828a64 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -9,6 +9,7 @@
#include <utility>
#include "base/base_switches.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/debug/alias.h"
#include "base/debug/leak_annotations.h"
@@ -67,6 +68,8 @@
#include "mojo/public/cpp/system/platform_handle.h"
#include "services/device/public/cpp/power_monitor/power_monitor_broadcast_source.h"
#include "services/resource_coordinator/public/cpp/memory/process_local_dump_manager_impl.h"
+#include "services/resource_coordinator/public/cpp/tracing/chrome_agent.h"
+#include "services/resource_coordinator/public/interfaces/tracing/tracing.mojom.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/interface_provider.h"
#include "services/service_manager/runner/common/client_util.h"
@@ -482,11 +485,16 @@ void ChildThreadImpl::Init(const Options& options) {
if (!IsInBrowserProcess()) {
// In single process mode, browser-side tracing and memory will cover the
// whole process including renderers.
- channel_->AddFilter(new tracing::ChildTraceMessageFilter(
- ChildProcess::current()->io_task_runner()));
+ // channel_->AddFilter(new tracing::ChildTraceMessageFilter(
+ // ChildProcess::current()->io_task_runner()));
channel_->AddFilter(new ChildMemoryMessageFilter());
if (service_manager_connection_) {
+ resource_coordinator::tracing::mojom::AgentSetPtr agent_set;
+ GetConnector()->BindInterface("tracing", mojo::MakeRequest(&agent_set));
+ resource_coordinator::tracing::ChromeAgent::InitializeIfNeeded(
+ std::move(agent_set));
+
memory_instrumentation::ProcessLocalDumpManagerImpl::Config config(
GetConnector(), mojom::kBrowserServiceName);
memory_instrumentation::ProcessLocalDumpManagerImpl::CreateInstance(
« no previous file with comments | « content/browser/tracing/tracing_controller_impl_data_sinks.cc ('k') | content/common/child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698