blob: fb110d59f2c9f46fa148069357c14e5f1f7e4677 [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2019 The Chromium Authors
Ken Rockot95fe3f62019-07-25 20:29:512// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/win/util_win_service.h"
6
7#include "chrome/grit/generated_resources.h"
Alex Goughc54b2b22021-08-20 03:06:328#include "chrome/services/util_win/public/mojom/util_win.mojom.h"
Ken Rockot95fe3f62019-07-25 20:29:519#include "content/public/browser/service_process_host.h"
10
11mojo::Remote<chrome::mojom::UtilWin> LaunchUtilWinServiceInstance() {
Alex Goughc54b2b22021-08-20 03:06:3212 // Runs with kNoSandbox from sandbox.mojom.Sandbox.
Ken Rockot95fe3f62019-07-25 20:29:5113 return content::ServiceProcessHost::Launch<chrome::mojom::UtilWin>(
14 content::ServiceProcessHost::Options()
15 .WithDisplayName(IDS_UTILITY_PROCESS_UTILITY_WIN_NAME)
Ken Rockot95fe3f62019-07-25 20:29:5116 .Pass());
17}
Alex Gough0c7b1092021-06-25 15:55:4518
19mojo::Remote<chrome::mojom::ProcessorMetrics> LaunchProcessorMetricsService() {
Alex Goughc54b2b22021-08-20 03:06:3220 // Runs with kNoSandbox from sandbox.mojom.Sandbox.
Alex Gough0c7b1092021-06-25 15:55:4521 return content::ServiceProcessHost::Launch<chrome::mojom::ProcessorMetrics>(
22 content::ServiceProcessHost::Options()
23 .WithDisplayName(IDS_UTILITY_PROCESS_UTILITY_WIN_NAME)
24 .Pass());
25}