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

Unified Diff: base/memory/shared_memory_handle_win.cc

Issue 1643253003: Add member ownership_passes_to_ipc_ to SharedMemoryHandle on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minimal test. Created 4 years, 11 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/shared_memory_handle.h ('k') | base/memory/shared_memory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_handle_win.cc
diff --git a/base/memory/shared_memory_handle_win.cc b/base/memory/shared_memory_handle_win.cc
index 571e4ef108569d091c20950224f19dc77a86c66d..e8b2687971dabfbd905a29c6cfefcc82c3c4d95a 100644
--- a/base/memory/shared_memory_handle_win.cc
+++ b/base/memory/shared_memory_handle_win.cc
@@ -9,13 +9,15 @@
namespace base {
SharedMemoryHandle::SharedMemoryHandle()
- : handle_(nullptr), pid_(kNullProcessId) {}
+ : handle_(nullptr), pid_(kNullProcessId), ownership_passes_to_ipc_(false) {}
SharedMemoryHandle::SharedMemoryHandle(HANDLE h, base::ProcessId pid)
- : handle_(h), pid_(pid) {}
+ : handle_(h), pid_(pid), ownership_passes_to_ipc_(false) {}
SharedMemoryHandle::SharedMemoryHandle(const SharedMemoryHandle& handle)
- : handle_(handle.handle_), pid_(handle.pid_) {}
+ : handle_(handle.handle_),
+ pid_(handle.pid_),
+ ownership_passes_to_ipc_(false) {}
SharedMemoryHandle& SharedMemoryHandle::operator=(
const SharedMemoryHandle& handle) {
@@ -24,6 +26,7 @@ SharedMemoryHandle& SharedMemoryHandle::operator=(
handle_ = handle.handle_;
pid_ = handle.pid_;
+ ownership_passes_to_ipc_ = handle.ownership_passes_to_ipc_;
return *this;
}
@@ -65,4 +68,12 @@ base::ProcessId SharedMemoryHandle::GetPID() const {
return pid_;
}
+void SharedMemoryHandle::SetOwnershipPassesToIPC(bool ownership_passes) {
+ ownership_passes_to_ipc_ = ownership_passes;
+}
+
+bool SharedMemoryHandle::OwnershipPassesToIPC() const {
+ return ownership_passes_to_ipc_;
+}
+
} // namespace base
« no previous file with comments | « base/memory/shared_memory_handle.h ('k') | base/memory/shared_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698