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

Unified Diff: content/common/sandbox_linux/sandbox_init_linux.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: Rename method. 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
Index: content/common/sandbox_linux/sandbox_init_linux.cc
diff --git a/content/common/sandbox_linux/sandbox_init_linux.cc b/content/common/sandbox_linux/sandbox_init_linux.cc
index 146b3528b697fbc29af225c0c596f6c8d2e94ea1..44ed36a2baaa3d4b5b906c591c7f9c5d880ab3da 100644
--- a/content/common/sandbox_linux/sandbox_init_linux.cc
+++ b/content/common/sandbox_linux/sandbox_init_linux.cc
@@ -23,4 +23,12 @@ scoped_ptr<sandbox::bpf_dsl::Policy> GetBPFSandboxBaselinePolicy() {
}
#endif // !defined(OS_NACL_NONSFI)
+bool BrokerDuplicateSharedMemoryHandle(
+ base::SharedMemoryHandle source_handle,
+ base::ProcessId target_process_id,
+ base::SharedMemoryHandle* target_handle) {
+ *target_handle = base::SharedMemory::DeepCopyHandle(source_handle, true);
+ return base::SharedMemory::IsHandleValid(*target_handle);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698