Avi Drissman | 4e1b7bc | 2022-09-15 14:03:50 | [diff] [blame] | 1 | // Copyright 2020 The Chromium Authors |
Dale Curtis | 2bce96e4 | 2020-02-19 23:31:18 | [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 | |
Ken Rockot | 9652fa6 | 2020-11-05 05:30:22 | [diff] [blame] | 5 | #include "content/test/sandbox_status_service.h" |
Dale Curtis | 2bce96e4 | 2020-02-19 23:31:18 | [diff] [blame] | 6 | |
| 7 | #include "mojo/public/cpp/bindings/self_owned_receiver.h" |
Robert Sesek | 7d0b49b | 2020-07-08 18:31:27 | [diff] [blame] | 8 | #include "sandbox/policy/linux/sandbox_linux.h" |
Dale Curtis | 2bce96e4 | 2020-02-19 23:31:18 | [diff] [blame] | 9 | |
Ken Rockot | 9652fa6 | 2020-11-05 05:30:22 | [diff] [blame] | 10 | namespace content { |
Dale Curtis | 2bce96e4 | 2020-02-19 23:31:18 | [diff] [blame] | 11 | |
| 12 | // static |
| 13 | void SandboxStatusService::MakeSelfOwnedReceiver( |
| 14 | mojo::PendingReceiver<mojom::SandboxStatusService> receiver) { |
| 15 | mojo::MakeSelfOwnedReceiver(std::make_unique<SandboxStatusService>(), |
| 16 | std::move(receiver)); |
| 17 | } |
| 18 | |
| 19 | SandboxStatusService::SandboxStatusService() = default; |
| 20 | |
| 21 | SandboxStatusService::~SandboxStatusService() = default; |
| 22 | |
| 23 | void SandboxStatusService::GetSandboxStatus(GetSandboxStatusCallback callback) { |
| 24 | std::move(callback).Run( |
Robert Sesek | 7d0b49b | 2020-07-08 18:31:27 | [diff] [blame] | 25 | sandbox::policy::SandboxLinux::GetInstance()->GetStatus()); |
Dale Curtis | 2bce96e4 | 2020-02-19 23:31:18 | [diff] [blame] | 26 | } |
| 27 | |
Ken Rockot | 9652fa6 | 2020-11-05 05:30:22 | [diff] [blame] | 28 | } // namespace content |