Index: base/memory/shared_memory.h |
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h |
index 68db65c2f3221c9419de0b86ae6f6469d9bb18d1..4326758177aac577f3f1f6702c027b19b25ff665 100644 |
--- a/base/memory/shared_memory.h |
+++ b/base/memory/shared_memory.h |
@@ -17,6 +17,7 @@ |
#include "base/base_export.h" |
#include "base/basictypes.h" |
+#include "base/memory/shared_memory_handle.h" |
#include "base/process/process_handle.h" |
#if defined(OS_POSIX) |
@@ -28,14 +29,6 @@ |
namespace base { |
class FilePath; |
- |
-// SharedMemoryHandle is a platform specific type which represents |
-// the underlying OS handle to a shared memory segment. |
-#if defined(OS_WIN) |
-typedef HANDLE SharedMemoryHandle; |
-#elif defined(OS_POSIX) |
-typedef FileDescriptor SharedMemoryHandle; |
-#endif |
// Options for creating a shared memory object. |
struct SharedMemoryCreateOptions { |
@@ -89,12 +82,13 @@ |
// only affects how the SharedMemory will be mmapped. Use |
// ShareReadOnlyToProcess to drop permissions. TODO(jln,jyasskin): DCHECK |
// that |read_only| matches the permissions of the handle. |
- SharedMemory(SharedMemoryHandle handle, bool read_only); |
+ SharedMemory(const SharedMemoryHandle& handle, bool read_only); |
// Create a new SharedMemory object from an existing, open |
// shared memory file that was created by a remote process and not shared |
// to the current process. |
- SharedMemory(SharedMemoryHandle handle, bool read_only, |
+ SharedMemory(const SharedMemoryHandle& handle, |
+ bool read_only, |
ProcessHandle process); |
// Closes any open files. |