OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #if defined(OS_MACOSX) | 8 #if defined(OS_MACOSX) |
9 extern "C" { | 9 extern "C" { |
10 #include <sandbox.h> | 10 #include <sandbox.h> |
11 } | 11 } |
12 #endif | 12 #endif |
13 #include <fcntl.h> | 13 #include <fcntl.h> |
14 #include <sys/stat.h> | 14 #include <sys/stat.h> |
15 #include <unistd.h> | 15 #include <unistd.h> |
16 | 16 |
17 #include "base/file_descriptor_posix.h" | 17 #include "base/file_descriptor_posix.h" |
18 #include "base/message_loop.h" | 18 #include "base/message_loop/message_loop.h" |
19 #include "base/pickle.h" | 19 #include "base/pickle.h" |
20 #include "base/posix/eintr_wrapper.h" | 20 #include "base/posix/eintr_wrapper.h" |
21 #include "ipc/ipc_message_utils.h" | 21 #include "ipc/ipc_message_utils.h" |
22 #include "ipc/ipc_test_base.h" | 22 #include "ipc/ipc_test_base.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 const unsigned kNumFDsToSend = 20; | 26 const unsigned kNumFDsToSend = 20; |
27 const char* kDevZeroPath = "/dev/zero"; | 27 const char* kDevZeroPath = "/dev/zero"; |
28 | 28 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 // See if we can receive a file descriptor. | 176 // See if we can receive a file descriptor. |
177 return SendFdsClientCommon("SendFdsSandboxedClient", st.st_ino); | 177 return SendFdsClientCommon("SendFdsSandboxedClient", st.st_ino); |
178 } | 178 } |
179 #endif // defined(OS_MACOSX) | 179 #endif // defined(OS_MACOSX) |
180 | 180 |
181 } // namespace | 181 } // namespace |
182 | 182 |
183 #endif // defined(OS_POSIX) | 183 #endif // defined(OS_POSIX) |
OLD | NEW |