summaryrefslogtreecommitdiffstats
path: root/base/shared_memory.h
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-22 21:33:27 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-22 21:33:27 +0000
commitde5abb99dd2c68a4164447cc67bfba228ec3353d (patch)
treec0104e68ff521f623955640bc5868c2b76b5e80a /base/shared_memory.h
parent3e43abd431ea6358a6637f09ba0659a4eb946633 (diff)
downloadchromium_src-de5abb99dd2c68a4164447cc67bfba228ec3353d.zip
chromium_src-de5abb99dd2c68a4164447cc67bfba228ec3353d.tar.gz
chromium_src-de5abb99dd2c68a4164447cc67bfba228ec3353d.tar.bz2
Reduce header dependencies.
Random files in V8Bindings were getting rebuilt when I touched process_util.h. I tracked it down to stats_table.h and shared_memory.h. This change cuts down some dependencies there; more could be removed if we made some of our FooHandle typedefs into abstract data types instead. Review URL: http://codereview.chromium.org/7307 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/shared_memory.h')
-rw-r--r--base/shared_memory.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/base/shared_memory.h b/base/shared_memory.h
index c5ebeee..358b7b5 100644
--- a/base/shared_memory.h
+++ b/base/shared_memory.h
@@ -5,8 +5,9 @@
#ifndef BASE_SHARED_MEMORY_H_
#define BASE_SHARED_MEMORY_H_
+#include <string>
#include "base/basictypes.h"
-#include "base/process_util.h"
+#include "base/process.h"
// SharedMemoryHandle is a platform specific type which represents
// the underlying OS handle to a shared memory segment.
@@ -44,13 +45,13 @@ class SharedMemory {
// If open_existing is true, and the shared memory already exists,
// opens the existing shared memory and ignores the size parameter.
// Returns true on success, false on failure.
- bool Create(const std::wstring &name, bool read_only, bool open_existing,
- size_t size);
+ bool Create(const std::wstring& name, bool read_only, bool open_existing,
+ size_t size);
// Opens a shared memory segment based on a name.
// If read_only is true, opens for read-only access.
// Returns true on success, false on failure.
- bool Open(const std::wstring &name, bool read_only);
+ bool Open(const std::wstring& name, bool read_only);
// Maps the shared memory into the caller's address space.
// Returns true on success, false otherwise. The memory address
@@ -89,7 +90,7 @@ class SharedMemory {
// the handle for use in the remote process.
// Returns true on success, false otherwise.
bool ShareToProcess(ProcessHandle process,
- SharedMemoryHandle *new_handle) {
+ SharedMemoryHandle* new_handle) {
return ShareToProcessCommon(process, new_handle, false);
}
@@ -98,7 +99,7 @@ class SharedMemory {
// Close();
// return ok;
bool GiveToProcess(ProcessHandle process,
- SharedMemoryHandle *new_handle) {
+ SharedMemoryHandle* new_handle) {
return ShareToProcessCommon(process, new_handle, true);
}
@@ -115,7 +116,8 @@ class SharedMemory {
bool CreateOrOpen(const std::wstring &name, int posix_flags);
#endif
bool ShareToProcessCommon(ProcessHandle process,
- SharedMemoryHandle *new_handle, bool close_self);
+ SharedMemoryHandle* new_handle,
+ bool close_self);
std::wstring name_;
SharedMemoryHandle mapped_file_;
@@ -147,4 +149,3 @@ class SharedMemoryAutoLock {
#endif // BASE_SHARED_MEMORY_H_
-