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

Unified Diff: base/shared_memory_win.cc

Issue 21208: POSIX: Transfer network data using shared memory (Closed)
Patch Set: ... Created 11 years, 10 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/shared_memory_posix.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/shared_memory_win.cc
diff --git a/base/shared_memory_win.cc b/base/shared_memory_win.cc
index 4ae47524e206b820a9313708195b6c0546948e7b..3822fc94b172439ebbaed9df18f9376bf89d31c2 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
« no previous file with comments | « base/shared_memory_posix.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698