| 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 #ifndef BASE_MEMORY_SHARED_MEMORY_H_ | 5 #ifndef BASE_MEMORY_SHARED_MEMORY_H_ |
| 6 #define BASE_MEMORY_SHARED_MEMORY_H_ | 6 #define BASE_MEMORY_SHARED_MEMORY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 299 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
| 300 // The OS primitive that backs the shared memory region. | 300 // The OS primitive that backs the shared memory region. |
| 301 SharedMemoryHandle shm_; | 301 SharedMemoryHandle shm_; |
| 302 | 302 |
| 303 // The mechanism by which the memory is mapped. Only valid if |memory_| is not | 303 // The mechanism by which the memory is mapped. Only valid if |memory_| is not |
| 304 // |nullptr|. | 304 // |nullptr|. |
| 305 SharedMemoryHandle::Type mapped_memory_mechanism_; | 305 SharedMemoryHandle::Type mapped_memory_mechanism_; |
| 306 | 306 |
| 307 int readonly_mapped_file_; | 307 int readonly_mapped_file_; |
| 308 #elif defined(OS_POSIX) | 308 #elif defined(OS_POSIX) |
| 309 int mapped_file_; | 309 // The OS primitive that backs the shared memory region. |
| 310 SharedMemoryHandle shm_; |
| 310 int readonly_mapped_file_; | 311 int readonly_mapped_file_; |
| 311 #endif | 312 #endif |
| 312 size_t mapped_size_; | 313 size_t mapped_size_; |
| 313 void* memory_; | 314 void* memory_; |
| 314 bool read_only_; | 315 bool read_only_; |
| 315 size_t requested_size_; | 316 size_t requested_size_; |
| 316 | 317 |
| 317 DISALLOW_COPY_AND_ASSIGN(SharedMemory); | 318 DISALLOW_COPY_AND_ASSIGN(SharedMemory); |
| 318 }; | 319 }; |
| 319 | 320 |
| 320 } // namespace base | 321 } // namespace base |
| 321 | 322 |
| 322 #endif // BASE_MEMORY_SHARED_MEMORY_H_ | 323 #endif // BASE_MEMORY_SHARED_MEMORY_H_ |
| OLD | NEW |