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

Unified Diff: base/memory/shared_memory_win.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Compile error. Created 3 years, 8 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_unittest.cc ('k') | base/metrics/persistent_memory_allocator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_win.cc
diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
index ffa7bd72bd1530d3f3180de8c73f328fc1663d24..bdb8244345e7bf94ab8ef63951ff5fef3a37f020 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -340,26 +340,6 @@ SharedMemoryHandle SharedMemory::GetReadOnlyHandle() {
return handle;
}
-bool SharedMemory::ShareToProcessCommon(ProcessHandle process,
- SharedMemoryHandle* new_handle) {
- *new_handle = SharedMemoryHandle();
- DWORD access = FILE_MAP_READ | SECTION_QUERY;
- DWORD options = 0;
- HANDLE mapped_file = mapped_file_.Get();
- HANDLE result;
- if (!read_only_)
- access |= FILE_MAP_WRITE;
-
- if (!::DuplicateHandle(GetCurrentProcess(), mapped_file, process, &result,
- access, FALSE, options)) {
- return false;
- }
- *new_handle = SharedMemoryHandle(result, base::GetProcId(process));
- new_handle->SetOwnershipPassesToIPC(true);
- return true;
-}
-
-
void SharedMemory::Close() {
mapped_file_.Close();
}
« no previous file with comments | « base/memory/shared_memory_unittest.cc ('k') | base/metrics/persistent_memory_allocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698