[go: nahoru, domu]

blob: dae9dabba75afd97abb2eaae48333589f59c69cf [file] [log] [blame]
Avi Drissman4e1b7bc2022-09-15 14:03:501// Copyright 2020 The Chromium Authors
Dale Curtis2bce96e42020-02-19 23:31:182// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ken Rockot9652fa62020-11-05 05:30:225#include "content/test/sandbox_status_service.h"
Dale Curtis2bce96e42020-02-19 23:31:186
7#include "mojo/public/cpp/bindings/self_owned_receiver.h"
Robert Sesek7d0b49b2020-07-08 18:31:278#include "sandbox/policy/linux/sandbox_linux.h"
Dale Curtis2bce96e42020-02-19 23:31:189
Ken Rockot9652fa62020-11-05 05:30:2210namespace content {
Dale Curtis2bce96e42020-02-19 23:31:1811
12// static
13void SandboxStatusService::MakeSelfOwnedReceiver(
14 mojo::PendingReceiver<mojom::SandboxStatusService> receiver) {
15 mojo::MakeSelfOwnedReceiver(std::make_unique<SandboxStatusService>(),
16 std::move(receiver));
17}
18
19SandboxStatusService::SandboxStatusService() = default;
20
21SandboxStatusService::~SandboxStatusService() = default;
22
23void SandboxStatusService::GetSandboxStatus(GetSandboxStatusCallback callback) {
24 std::move(callback).Run(
Robert Sesek7d0b49b2020-07-08 18:31:2725 sandbox::policy::SandboxLinux::GetInstance()->GetStatus());
Dale Curtis2bce96e42020-02-19 23:31:1826}
27
Ken Rockot9652fa62020-11-05 05:30:2228} // namespace content