Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: sandbox/linux/syscall_broker/broker_host.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_ 5 #ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_
6 #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_ 6 #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "sandbox/linux/syscall_broker/broker_channel.h"
9 10
10 namespace sandbox { 11 namespace sandbox {
11 12
12 namespace syscall_broker { 13 namespace syscall_broker {
13 14
14 class BrokerPolicy; 15 class BrokerPolicy;
15 16
16 // The BrokerHost class should be embedded in a (presumably not sandboxed) 17 // The BrokerHost class should be embedded in a (presumably not sandboxed)
17 // process. It will honor IPC requests from a BrokerClient sent over 18 // process. It will honor IPC requests from a BrokerClient sent over
18 // |ipc_channel| according to |broker_policy|. 19 // |ipc_channel| according to |broker_policy|.
19 class BrokerHost { 20 class BrokerHost {
20 public: 21 public:
21 BrokerHost(const BrokerPolicy& broker_policy, int ipc_channel); 22 enum class RequestStatus { LOST_CLIENT = 0, SUCCESS, FAILURE };
23
24 BrokerHost(const BrokerPolicy& broker_policy,
25 BrokerChannel::EndPoint ipc_channel);
22 ~BrokerHost(); 26 ~BrokerHost();
23 27
24 bool HandleRequest() const; 28 RequestStatus HandleRequest() const;
25 29
26 private: 30 private:
27 const BrokerPolicy& broker_policy_; 31 const BrokerPolicy& broker_policy_;
28 const int ipc_channel_; 32 const BrokerChannel::EndPoint ipc_channel_;
33
29 DISALLOW_COPY_AND_ASSIGN(BrokerHost); 34 DISALLOW_COPY_AND_ASSIGN(BrokerHost);
30 }; 35 };
31 36
32 } // namespace syscall_broker 37 } // namespace syscall_broker
33 38
34 } // namespace sandbox 39 } // namespace sandbox
35 40
36 #endif // SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_ 41 #endif // SANDBOX_LINUX_SYSCALL_BROKER_BROKER_HOST_H_
OLDNEW
« no previous file with comments | « sandbox/linux/syscall_broker/broker_client.cc ('k') | sandbox/linux/syscall_broker/broker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698