OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ipc/ipc_message_attachment_set.h" | 5 #include "ipc/ipc_message_attachment_set.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
| 10 |
8 #include "base/logging.h" | 11 #include "base/logging.h" |
9 #include "base/posix/eintr_wrapper.h" | 12 #include "base/posix/eintr_wrapper.h" |
| 13 #include "build/build_config.h" |
10 #include "ipc/brokerable_attachment.h" | 14 #include "ipc/brokerable_attachment.h" |
11 #include "ipc/ipc_message_attachment.h" | 15 #include "ipc/ipc_message_attachment.h" |
12 | 16 |
13 #if defined(OS_POSIX) | 17 #if defined(OS_POSIX) |
| 18 #include <sys/stat.h> |
14 #include <sys/types.h> | 19 #include <sys/types.h> |
15 #include <sys/stat.h> | |
16 #include <unistd.h> | 20 #include <unistd.h> |
17 #include "ipc/ipc_platform_file_attachment_posix.h" | 21 #include "ipc/ipc_platform_file_attachment_posix.h" |
18 #endif // OS_POSIX | 22 #endif // OS_POSIX |
19 | 23 |
20 namespace IPC { | 24 namespace IPC { |
21 | 25 |
22 namespace { | 26 namespace { |
23 | 27 |
24 unsigned count_attachments_of_type( | 28 unsigned count_attachments_of_type( |
25 const std::vector<scoped_refptr<MessageAttachment>>& attachments, | 29 const std::vector<scoped_refptr<MessageAttachment>>& attachments, |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 for (unsigned i = 0; i < count; ++i) | 241 for (unsigned i = 0; i < count; ++i) |
238 AddAttachment( | 242 AddAttachment( |
239 new internal::PlatformFileAttachment(base::ScopedFD(buffer[i]))); | 243 new internal::PlatformFileAttachment(base::ScopedFD(buffer[i]))); |
240 } | 244 } |
241 | 245 |
242 #endif // OS_POSIX | 246 #endif // OS_POSIX |
243 | 247 |
244 } // namespace IPC | 248 } // namespace IPC |
245 | 249 |
246 | 250 |
OLD | NEW |