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

Unified Diff: sandbox/linux/syscall_broker/broker_host.cc

Issue 717673002: Linux sandbox: introduce BrokerChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename GetPair to CreatePair. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/syscall_broker/broker_host.h ('k') | sandbox/linux/syscall_broker/broker_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/syscall_broker/broker_host.cc
diff --git a/sandbox/linux/syscall_broker/broker_host.cc b/sandbox/linux/syscall_broker/broker_host.cc
index 19e42e7d063d25c4899156673b8ad7121af4f73d..29300f7e374359ec4038db80c46105de658aa60f 100644
--- a/sandbox/linux/syscall_broker/broker_host.cc
+++ b/sandbox/linux/syscall_broker/broker_host.cc
@@ -154,8 +154,9 @@ bool HandleRemoteCommand(const BrokerPolicy& policy,
} // namespace
-BrokerHost::BrokerHost(const BrokerPolicy& broker_policy, int ipc_channel)
- : broker_policy_(broker_policy), ipc_channel_(ipc_channel) {
+BrokerHost::BrokerHost(const BrokerPolicy& broker_policy,
+ BrokerChannel::EndPoint ipc_channel)
+ : broker_policy_(broker_policy), ipc_channel_(ipc_channel.Pass()) {
}
BrokerHost::~BrokerHost() {
@@ -170,7 +171,7 @@ BrokerHost::RequestStatus BrokerHost::HandleRequest() const {
char buf[kMaxMessageLength];
errno = 0;
const ssize_t msg_len =
- UnixDomainSocket::RecvMsg(ipc_channel_, buf, sizeof(buf), &fds);
+ UnixDomainSocket::RecvMsg(ipc_channel_.get(), buf, sizeof(buf), &fds);
if (msg_len == 0 || (msg_len == -1 && errno == ECONNRESET)) {
// EOF from the client, or the client died, we should die.
« no previous file with comments | « sandbox/linux/syscall_broker/broker_host.h ('k') | sandbox/linux/syscall_broker/broker_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698