summaryrefslogtreecommitdiffstats
path: root/base/shared_memory_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/shared_memory_win.cc')
-rw-r--r--base/shared_memory_win.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/shared_memory_win.cc b/base/shared_memory_win.cc
index 4ae4752..3822fc9 100644
--- a/base/shared_memory_win.cc
+++ b/base/shared_memory_win.cc
@@ -45,6 +45,11 @@ SharedMemory::~SharedMemory() {
CloseHandle(lock_);
}
+// static
+bool SharedMemory::IsHandleValid(const SharedMemoryHandle& handle) {
+ return handle != NULL;
+}
+
bool SharedMemory::Create(const std::wstring &name, bool read_only,
bool open_existing, size_t size) {
DCHECK(mapped_file_ == NULL);
@@ -168,4 +173,8 @@ void SharedMemory::Unlock() {
ReleaseMutex(lock_);
}
+SharedMemoryHandle SharedMemory::handle() const {
+ return mapped_file_;
+}
+
} // namespace base