1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_
6 #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_
8 #include "base/macros.h"
9 #include "sandbox/linux/syscall_broker/broker_channel.h"
13 namespace syscall_broker
{
17 // The BrokerHost class should be embedded in a (presumably not sandboxed)
18 // process. It will honor IPC requests from a BrokerClient sent over
19 // |ipc_channel| according to |broker_policy|.
22 enum class RequestStatus
{ LOST_CLIENT
= 0, SUCCESS
, FAILURE
};
24 BrokerHost(const BrokerPolicy
& broker_policy
,
25 BrokerChannel::EndPoint ipc_channel
);
28 RequestStatus
HandleRequest() const;
31 const BrokerPolicy
& broker_policy_
;
32 const BrokerChannel::EndPoint ipc_channel_
;
34 DISALLOW_COPY_AND_ASSIGN(BrokerHost
);
37 } // namespace syscall_broker
39 } // namespace sandbox
41 #endif // SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_