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

Unified Diff: base/memory/shared_memory.h

Issue 2847033003: Get rid of SharedMemory::GiveToProcess. (Closed)
Patch Set: Comments from avi. 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 | « no previous file | base/memory/shared_memory_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory.h
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index 401e214175f190ea0e24e1f2042d3b51a0f2bb6c..d1be55b8cb9d3246fc7d0c76ae07f3459036140b 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -223,18 +223,7 @@ class BASE_EXPORT SharedMemory {
// Returns true on success, false otherwise.
bool ShareToProcess(ProcessHandle process,
SharedMemoryHandle* new_handle) {
- return ShareToProcessCommon(process, new_handle, false);
- }
-
- // Logically equivalent to:
- // bool ok = ShareToProcess(process, new_handle);
- // Close();
- // return ok;
- // Note that the memory is unmapped by calling this method, regardless of the
- // return value.
- bool GiveToProcess(ProcessHandle process,
- SharedMemoryHandle* new_handle) {
- return ShareToProcessCommon(process, new_handle, true);
+ return ShareToProcessCommon(process, new_handle);
}
#if defined(OS_POSIX) && (!defined(OS_MACOSX) || defined(OS_IOS)) && \
@@ -263,8 +252,7 @@ class BASE_EXPORT SharedMemory {
#endif
bool ShareToProcessCommon(ProcessHandle process,
- SharedMemoryHandle* new_handle,
- bool close_self);
+ SharedMemoryHandle* new_handle);
#if defined(OS_WIN)
// If true indicates this came from an external source so needs extra checks
« no previous file with comments | « no previous file | base/memory/shared_memory_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698