blob: eb30ff0fa22d86af7a71ea016b448975add4e591 [file] [log] [blame]
// Copyright 2019 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 "services/tracing/manifest.h"
#include "base/no_destructor.h"
#include "services/service_manager/public/cpp/manifest_builder.h"
#include "services/tracing/public/mojom/constants.mojom.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h"
#include "services/tracing/public/mojom/tracing.mojom.h"
namespace tracing {
const service_manager::Manifest& GetManifest() {
static base::NoDestructor<service_manager::Manifest> manifest{
service_manager::ManifestBuilder()
.WithServiceName(mojom::kServiceName)
.WithDisplayName("Tracing")
.WithOptions(service_manager::ManifestOptionsBuilder()
.WithInstanceSharingPolicy(
service_manager::Manifest::
InstanceSharingPolicy::kSingleton)
.Build())
.ExposeCapability(
"tracing",
service_manager::Manifest::InterfaceList<mojom::Coordinator>())
.ExposeCapability("app",
service_manager::Manifest::InterfaceList<
mojom::AgentRegistry, mojom::PerfettoService>())
.RequireCapability("service_manager",
"service_manager:service_manager")
.Build()};
return *manifest;
}
} // namespace tracing