Commit dde2605c authored by Oystein Eftevaag's avatar Oystein Eftevaag Committed by Commit Bot

Tracing: Lower priority of TracedProcess interface bind requests

Currently the tracing service will unconditionally connect to
the TracedProcess interface on all services, which is a feature
provided by the service_manager client lib. This change allows
RequestQuit() calls services make, to still succeed even if
there's an outstanding TracedProcess bind request, as it's
not the service itself which handles this request.

See discussion in https://chromium-review.googlesource.com/c/chromium/src/+/1452767

R=ssid@chromium.org

Change-Id: Id7a4a6dc8eaa982b0ce24d7a699b430b3c07f833
Reviewed-on: https://chromium-review.googlesource.com/c/1457214
Commit-Queue: oysteine <oysteine@chromium.org>
Commit-Queue: ssid <ssid@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarssid <ssid@chromium.org>
Auto-Submit: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629865}
parent 18cd5970
......@@ -169,11 +169,11 @@ class SERVICE_MANAGER_PUBLIC_CPP_EXPORT Connector {
}
template <typename Interface>
void BindInterface(const std::string& service_name,
void BindInterface(const ServiceFilter& filter,
mojo::InterfaceRequest<Interface> request,
mojom::BindInterfacePriority priority) {
return BindInterface(ServiceFilter::ByName(service_name), Interface::Name_,
request.PassMessagePipe(), priority, nullptr);
return BindInterface(filter, Interface::Name_, request.PassMessagePipe(),
priority, {});
}
void BindInterface(const ServiceFilter& filter,
......
......@@ -46,7 +46,8 @@ class ServiceListener : public service_manager::mojom::ServiceManagerListener {
mojom::TracedProcessPtr traced_process;
connector_->BindInterface(
service_manager::ServiceFilter::ForExactIdentity(identity),
&traced_process);
mojo::MakeRequest(&traced_process),
service_manager::mojom::BindInterfacePriority::kBestEffort);
auto new_connection_request = mojom::ConnectToTracingRequest::New();
......
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