Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame^] | 1 | // Copyright 2019 The Chromium Authors |
Ken Rockot | 95fe3f6 | 2019-07-25 20:29:51 | [diff] [blame] | 2 | // 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 Gough | c54b2b2 | 2021-08-20 03:06:32 | [diff] [blame] | 8 | #include "chrome/services/util_win/public/mojom/util_win.mojom.h" |
Ken Rockot | 95fe3f6 | 2019-07-25 20:29:51 | [diff] [blame] | 9 | #include "content/public/browser/service_process_host.h" |
| 10 | |
| 11 | mojo::Remote<chrome::mojom::UtilWin> LaunchUtilWinServiceInstance() { |
Alex Gough | c54b2b2 | 2021-08-20 03:06:32 | [diff] [blame] | 12 | // Runs with kNoSandbox from sandbox.mojom.Sandbox. |
Ken Rockot | 95fe3f6 | 2019-07-25 20:29:51 | [diff] [blame] | 13 | return content::ServiceProcessHost::Launch<chrome::mojom::UtilWin>( |
| 14 | content::ServiceProcessHost::Options() |
| 15 | .WithDisplayName(IDS_UTILITY_PROCESS_UTILITY_WIN_NAME) |
Ken Rockot | 95fe3f6 | 2019-07-25 20:29:51 | [diff] [blame] | 16 | .Pass()); |
| 17 | } |
Alex Gough | 0c7b109 | 2021-06-25 15:55:45 | [diff] [blame] | 18 | |
| 19 | mojo::Remote<chrome::mojom::ProcessorMetrics> LaunchProcessorMetricsService() { |
Alex Gough | c54b2b2 | 2021-08-20 03:06:32 | [diff] [blame] | 20 | // Runs with kNoSandbox from sandbox.mojom.Sandbox. |
Alex Gough | 0c7b109 | 2021-06-25 15:55:45 | [diff] [blame] | 21 | return content::ServiceProcessHost::Launch<chrome::mojom::ProcessorMetrics>( |
| 22 | content::ServiceProcessHost::Options() |
| 23 | .WithDisplayName(IDS_UTILITY_PROCESS_UTILITY_WIN_NAME) |
| 24 | .Pass()); |
| 25 | } |