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

Unified Diff: mojo/common/tracing_impl.cc

Issue 1954263003: Monet: Roll mojo_sdk to 3762c8c0b74b48b00786a42fca8f7db7f761935f. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 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
« no previous file with comments | « mojo/common/tracing_impl.h ('k') | mojo/data_pipe_utils/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/tracing_impl.cc
diff --git a/mojo/common/tracing_impl.cc b/mojo/common/tracing_impl.cc
index a93e3d8b0d60203a37fa665a568ddf7cf3a8ef6e..93f6e55bca16baa5d0072d09d4d7d1165c19ee82 100644
--- a/mojo/common/tracing_impl.cc
+++ b/mojo/common/tracing_impl.cc
@@ -5,8 +5,12 @@
#include "mojo/common/tracing_impl.h"
#include "base/trace_event/trace_event_impl.h"
-#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_impl.h"
+#include "mojo/public/cpp/application/connect.h"
+#include "mojo/public/cpp/bindings/interface_handle.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/services/tracing/interfaces/trace_provider_registry.mojom.h"
+#include "mojo/services/tracing/interfaces/tracing.mojom.h"
namespace mojo {
@@ -15,8 +19,12 @@ TracingImpl::TracingImpl() {}
TracingImpl::~TracingImpl() {}
void TracingImpl::Initialize(ApplicationImpl* app) {
- ApplicationConnection* connection = app->ConnectToApplication("mojo:tracing");
- connection->AddService(this);
+ tracing::TraceProviderRegistryPtr registry;
+ ConnectToService(app->shell(), "mojo:tracing", GetProxy(&registry));
+
+ mojo::InterfaceHandle<tracing::TraceProvider> provider;
+ provider_impl_.Bind(GetProxy(&provider));
+ registry->RegisterTraceProvider(provider.Pass());
#ifdef NDEBUG
if (app->HasArg("--early-tracing")) {
@@ -27,9 +35,4 @@ void TracingImpl::Initialize(ApplicationImpl* app) {
#endif
}
-void TracingImpl::Create(ApplicationConnection* connection,
- InterfaceRequest<tracing::TraceProvider> request) {
- provider_impl_.Bind(request.Pass());
-}
-
} // namespace mojo
« no previous file with comments | « mojo/common/tracing_impl.h ('k') | mojo/data_pipe_utils/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698