Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: base/memory/shared_memory.h

Issue 2567293003: Add a macro for SharedMemory::Share (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 #if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID) && \ 259 #if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID) && \
260 !(defined(OS_MACOSX) && !defined(OS_IOS)) 260 !(defined(OS_MACOSX) && !defined(OS_IOS))
261 bool FilePathForMemoryName(const std::string& mem_name, FilePath* path); 261 bool FilePathForMemoryName(const std::string& mem_name, FilePath* path);
262 #endif 262 #endif
263 263
264 enum ShareMode { 264 enum ShareMode {
265 SHARE_READONLY, 265 SHARE_READONLY,
266 SHARE_CURRENT_MODE, 266 SHARE_CURRENT_MODE,
267 }; 267 };
268 268
269 #if defined(OS_MACOSX)
269 bool Share(SharedMemoryHandle* new_handle, ShareMode share_mode); 270 bool Share(SharedMemoryHandle* new_handle, ShareMode share_mode);
271 #endif
270 272
271 bool ShareToProcessCommon(ProcessHandle process, 273 bool ShareToProcessCommon(ProcessHandle process,
272 SharedMemoryHandle* new_handle, 274 SharedMemoryHandle* new_handle,
273 bool close_self, 275 bool close_self,
274 ShareMode); 276 ShareMode);
275 277
276 #if defined(OS_WIN) 278 #if defined(OS_WIN)
277 // If true indicates this came from an external source so needs extra checks 279 // If true indicates this came from an external source so needs extra checks
278 // before being mapped. 280 // before being mapped.
279 bool external_section_; 281 bool external_section_;
(...skipping 15 matching lines...) Expand all
295 size_t mapped_size_; 297 size_t mapped_size_;
296 void* memory_; 298 void* memory_;
297 bool read_only_; 299 bool read_only_;
298 size_t requested_size_; 300 size_t requested_size_;
299 301
300 DISALLOW_COPY_AND_ASSIGN(SharedMemory); 302 DISALLOW_COPY_AND_ASSIGN(SharedMemory);
301 }; 303 };
302 } // namespace base 304 } // namespace base
303 305
304 #endif // BASE_MEMORY_SHARED_MEMORY_H_ 306 #endif // BASE_MEMORY_SHARED_MEMORY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698