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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 #if defined(OS_WIN) | 261 #if defined(OS_WIN) |
262 // If true indicates this came from an external source so needs extra checks | 262 // If true indicates this came from an external source so needs extra checks |
263 // before being mapped. | 263 // before being mapped. |
264 bool external_section_; | 264 bool external_section_; |
265 std::wstring name_; | 265 std::wstring name_; |
266 HANDLE mapped_file_; | 266 HANDLE mapped_file_; |
267 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 267 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
268 // The OS primitive that backs the shared memory region. | 268 // The OS primitive that backs the shared memory region. |
269 SharedMemoryHandle shm_; | 269 SharedMemoryHandle shm_; |
270 | |
271 int readonly_mapped_file_; | |
272 #elif defined(OS_POSIX) | 270 #elif defined(OS_POSIX) |
273 int mapped_file_; | 271 int mapped_file_; |
274 int readonly_mapped_file_; | 272 int readonly_mapped_file_; |
275 #endif | 273 #endif |
276 size_t mapped_size_; | 274 size_t mapped_size_; |
277 void* memory_; | 275 void* memory_; |
278 bool read_only_; | 276 bool read_only_; |
279 size_t requested_size_; | 277 size_t requested_size_; |
280 | 278 |
281 DISALLOW_COPY_AND_ASSIGN(SharedMemory); | 279 DISALLOW_COPY_AND_ASSIGN(SharedMemory); |
282 }; | 280 }; |
283 } // namespace base | 281 } // namespace base |
284 | 282 |
285 #endif // BASE_MEMORY_SHARED_MEMORY_H_ | 283 #endif // BASE_MEMORY_SHARED_MEMORY_H_ |
OLD | NEW |