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

Unified Diff: content/common/sandbox_init_mac.cc

Issue 1166473003: Add a method BrokerDuplicateSharedMemoryHandle() to the sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared_memory_add_helper_methods
Patch Set: Pass SharedMemoryHandle by const ref. Created 5 years, 7 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 | content/common/sandbox_init_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_init_mac.cc
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
index 609517932c2fe6c9e6fc8ad3430e3c550dc8f206..2597a75f14d8da8768168c426dd773f79b7684f7 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -74,6 +74,14 @@ bool InitializeSandbox() {
return InitializeSandbox(sandbox_type, allowed_dir);
}
+bool BrokerDuplicateSharedMemoryHandle(
+ const base::SharedMemoryHandle& source_handle,
+ base::ProcessId target_process_id,
+ base::SharedMemoryHandle* target_handle) {
+ *target_handle = base::SharedMemory::DuplicateHandle(source_handle);
+ return base::SharedMemory::IsHandleValid(*target_handle);
+}
+
extern const char kBootstrapPortNameForNPAPIPlugins[] =
"org.chromium.sandbox.real_bootstrap_server";
« no previous file with comments | « no previous file | content/common/sandbox_init_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698