| Index: base/memory/shared_memory.h
|
| diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
|
| index d76e01c6e57612024fe35dc7c430229d89cd5112..98a0e3e6c627c27423133873a1137165490f49c5 100644
|
| --- a/base/memory/shared_memory.h
|
| +++ b/base/memory/shared_memory.h
|
| @@ -116,6 +116,23 @@ class BASE_EXPORT SharedMemory {
|
| // Returns the maximum number of handles that can be open at once per process.
|
| static size_t GetHandleLimit();
|
|
|
| +#if defined(OS_WIN) || defined(OS_POSIX)
|
| + // The copy shares the same underlying OS primitives. The new
|
| + // SharedMemoryHandle will not clean up the OS primitives when destroyed. The
|
| + // original must outlive the copy.
|
| + static SharedMemoryHandle ShallowCopyOfHandle(
|
| + const SharedMemoryHandle& handle);
|
| +#endif
|
| +
|
| +#if defined(OS_POSIX)
|
| + // The underlying OS primitives are duplicated.
|
| + // |clean_up_resources_on_destruction| indicates whether the underlying OS
|
| + // primitives are cleaned up on destruction.
|
| + static SharedMemoryHandle DeepCopyOfHandle(
|
| + const SharedMemoryHandle& handle,
|
| + bool clean_up_resources_on_destruction);
|
| +#endif
|
| +
|
| // Creates a shared memory object as described by the options struct.
|
| // Returns true on success and false on failure.
|
| bool Create(const SharedMemoryCreateOptions& options);
|
|
|