Commit c6885077 authored by Abhijeet Kandalkar's avatar Abhijeet Kandalkar Committed by Commit Bot

Convert traced_process.mojom to new Mojo types

This CL converts TracedProcessPtr and uses new Mojo types.

Bug: 955171, 978694
Change-Id: Id634ececb5389b073d4a2424625bd36400ce53c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1788120Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#702437}
parent 0c3f4199
......@@ -126,9 +126,12 @@ class SERVICE_MANAGER_PUBLIC_CPP_EXPORT Connector {
// does, before routing the Receiver to it.
template <typename Interface>
void Connect(const ServiceFilter& filter,
mojo::PendingReceiver<Interface> receiver) {
mojo::PendingReceiver<Interface> receiver,
mojom::BindInterfacePriority priority =
mojom::BindInterfacePriority::kImportant) {
BindInterface(filter,
mojo::InterfaceRequest<Interface>(std::move(receiver)));
mojo::InterfaceRequest<Interface>(std::move(receiver)),
priority);
}
// A variant of the above which constructs a simple ServiceFilter by service
......
......@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/stl_util.h"
#include "base/timer/timer.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/service_manager/public/mojom/service_manager.mojom.h"
#include "services/tracing/agent_registry.h"
#include "services/tracing/coordinator.h"
......@@ -70,10 +71,10 @@ class ServiceListener : public service_manager::mojom::ServiceManagerListener {
// remains alive. Subsequent TracedProcess endpoints will be dropped and
// their calls will never be processed.
mojom::TracedProcessPtr traced_process;
connector_->BindInterface(
mojo::Remote<mojom::TracedProcess> traced_process;
connector_->Connect(
service_manager::ServiceFilter::ForExactIdentity(identity),
mojo::MakeRequest(&traced_process),
traced_process.BindNewPipeAndPassReceiver(),
service_manager::mojom::BindInterfacePriority::kBestEffort);
auto new_connection_request = mojom::ConnectToTracingRequest::New();
......@@ -141,7 +142,7 @@ class ServiceListener : public service_manager::mojom::ServiceManagerListener {
private:
void OnProcessConnected(
mojom::TracedProcessPtr traced_process,
mojo::Remote<mojom::TracedProcess> traced_process,
uint32_t pid,
mojo::PendingReceiver<mojom::PerfettoService> service_receiver,
mojo::PendingReceiver<mojom::AgentRegistry> registry_receiver) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment