| 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 <stddef.h> |
| 9 #include <sys/mman.h> | 10 #include <sys/mman.h> |
| 10 #include <sys/stat.h> | 11 #include <sys/stat.h> |
| 11 #include <unistd.h> | 12 #include <unistd.h> |
| 12 | 13 |
| 13 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 14 #include "base/files/scoped_file.h" | 15 #include "base/files/scoped_file.h" |
| 15 #include "base/logging.h" | 16 #include "base/logging.h" |
| 16 #include "base/posix/eintr_wrapper.h" | 17 #include "base/posix/eintr_wrapper.h" |
| 17 #include "base/posix/safe_strerror.h" | 18 #include "base/posix/safe_strerror.h" |
| 18 #include "base/process/process_metrics.h" | 19 #include "base/process/process_metrics.h" |
| 19 #include "base/profiler/scoped_tracker.h" | 20 #include "base/profiler/scoped_tracker.h" |
| 20 #include "base/scoped_generic.h" | 21 #include "base/scoped_generic.h" |
| 21 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
| 23 #include "build/build_config.h" |
| 22 | 24 |
| 23 #if defined(OS_ANDROID) | 25 #if defined(OS_ANDROID) |
| 24 #include "base/os_compat_android.h" | 26 #include "base/os_compat_android.h" |
| 25 #include "third_party/ashmem/ashmem.h" | 27 #include "third_party/ashmem/ashmem.h" |
| 26 #endif | 28 #endif |
| 27 | 29 |
| 28 namespace base { | 30 namespace base { |
| 29 | 31 |
| 30 namespace { | 32 namespace { |
| 31 | 33 |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 | 494 |
| 493 if (close_self) { | 495 if (close_self) { |
| 494 Unmap(); | 496 Unmap(); |
| 495 Close(); | 497 Close(); |
| 496 } | 498 } |
| 497 | 499 |
| 498 return true; | 500 return true; |
| 499 } | 501 } |
| 500 | 502 |
| 501 } // namespace base | 503 } // namespace base |
| OLD | NEW |