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

Unified Diff: base/memory/shared_memory.h

Issue 1197853004: Revert of Revert of Make SharedMemoryHandle a class on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared_memory_make_class3_base
Patch Set: Created 5 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/BUILD.gn ('k') | base/memory/shared_memory_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « base/memory/BUILD.gn ('k') | base/memory/shared_memory_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698