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 "base/memory/shared_memory.h" | 5 #include "base/memory/shared_memory.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <sys/mman.h> | 9 #include <sys/mman.h> |
10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
11 #include <unistd.h> | 11 #include <unistd.h> |
12 | 12 |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
17 #include "base/safe_strerror_posix.h" | 17 #include "base/safe_strerror_posix.h" |
| 18 #include "base/strings/utf_string_conversions.h" |
18 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
19 #include "base/threading/platform_thread.h" | 20 #include "base/threading/platform_thread.h" |
20 #include "base/threading/thread_restrictions.h" | 21 #include "base/threading/thread_restrictions.h" |
21 #include "base/utf_string_conversions.h" | |
22 | 22 |
23 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
24 #include "base/mac/foundation_util.h" | 24 #include "base/mac/foundation_util.h" |
25 #endif // OS_MACOSX | 25 #endif // OS_MACOSX |
26 | 26 |
27 #if defined(OS_ANDROID) | 27 #if defined(OS_ANDROID) |
28 #include "base/os_compat_android.h" | 28 #include "base/os_compat_android.h" |
29 #include "third_party/ashmem/ashmem.h" | 29 #include "third_party/ashmem/ashmem.h" |
30 #endif | 30 #endif |
31 | 31 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 new_handle->fd = new_fd; | 379 new_handle->fd = new_fd; |
380 new_handle->auto_close = true; | 380 new_handle->auto_close = true; |
381 | 381 |
382 if (close_self) | 382 if (close_self) |
383 Close(); | 383 Close(); |
384 | 384 |
385 return true; | 385 return true; |
386 } | 386 } |
387 | 387 |
388 } // namespace base | 388 } // namespace base |
OLD | NEW |