diff options
Diffstat (limited to 'chromium/services/tracing/manifest.cc')
-rw-r--r-- | chromium/services/tracing/manifest.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chromium/services/tracing/manifest.cc b/chromium/services/tracing/manifest.cc index 2a413d68017..ef733e8e894 100644 --- a/chromium/services/tracing/manifest.cc +++ b/chromium/services/tracing/manifest.cc @@ -4,8 +4,10 @@ #include "services/tracing/manifest.h" +#include "base/feature_list.h" #include "base/no_destructor.h" #include "services/service_manager/public/cpp/manifest_builder.h" +#include "services/tracing/public/cpp/tracing_features.h" #include "services/tracing/public/mojom/constants.mojom.h" #include "services/tracing/public/mojom/perfetto_service.mojom.h" #include "services/tracing/public/mojom/traced_process.mojom.h" @@ -13,12 +15,23 @@ namespace tracing { +namespace { + +service_manager::Manifest::ExecutionMode GetTracingExecutionMode() { + return base::FeatureList::IsEnabled(features::kTracingServiceInProcess) + ? service_manager::Manifest::ExecutionMode::kInProcessBuiltin + : service_manager::Manifest::ExecutionMode::kOutOfProcessBuiltin; +} + +} // namespace + const service_manager::Manifest& GetManifest() { static base::NoDestructor<service_manager::Manifest> manifest{ service_manager::ManifestBuilder() .WithServiceName(mojom::kServiceName) .WithDisplayName("Tracing") .WithOptions(service_manager::ManifestOptionsBuilder() + .WithExecutionMode(GetTracingExecutionMode()) .WithInstanceSharingPolicy( service_manager::Manifest:: InstanceSharingPolicy::kSingleton) |