OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "remoting/host/ipc_util.h" | 5 #include "remoting/host/ipc_util.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <sys/socket.h> | 8 #include <sys/socket.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 29 matching lines...) Expand all Loading... |
40 PLOG(ERROR) << "close()"; | 40 PLOG(ERROR) << "close()"; |
41 return false; | 41 return false; |
42 } | 42 } |
43 | 43 |
44 std::string socket_name = "Chromoting socket"; | 44 std::string socket_name = "Chromoting socket"; |
45 | 45 |
46 // Wrap the pipe into an IPC channel. | 46 // Wrap the pipe into an IPC channel. |
47 base::FileDescriptor fd(pipe_fds[0], false); | 47 base::FileDescriptor fd(pipe_fds[0], false); |
48 IPC::ChannelHandle handle(socket_name, fd); | 48 IPC::ChannelHandle handle(socket_name, fd); |
49 *server_out = IPC::ChannelProxy::Create(IPC::ChannelHandle(socket_name, fd), | 49 *server_out = IPC::ChannelProxy::Create(IPC::ChannelHandle(socket_name, fd), |
50 IPC::Channel::MODE_SERVER, | 50 IPC::Channel::MODE_SERVER, listener, |
51 listener, | 51 io_task_runner.get()); |
52 io_task_runner.get(), | |
53 nullptr); | |
54 | 52 |
55 *client_out = base::File(pipe_fds[1]); | 53 *client_out = base::File(pipe_fds[1]); |
56 return true; | 54 return true; |
57 } | 55 } |
58 | 56 |
59 } // namespace remoting | 57 } // namespace remoting |
OLD | NEW |