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

Unified Diff: content/public/common/sandbox_init.h

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 | « content/common/sandbox_init_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/sandbox_init.h
diff --git a/content/public/common/sandbox_init.h b/content/public/common/sandbox_init.h
index 6f4b19c9ea4aefc037a3821babbc9d48e4d6ca04..1a312339ee8e58013604c64283055cdcbe102edb 100644
--- a/content/public/common/sandbox_init.h
+++ b/content/public/common/sandbox_init.h
@@ -7,7 +7,9 @@
#include "base/files/scoped_file.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/shared_memory.h"
#include "base/process/process.h"
+#include "base/process/process_handle.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
@@ -26,6 +28,17 @@ struct SandboxInterfaceInfo;
namespace content {
class SandboxedProcessLauncherDelegate;
+#if defined(OS_WIN) || defined(OS_MACOSX)
+// This function allows a sandboxed process to duplicate a SharedMemoryHandle
+// to itself or to another process. The duplicated SharedMemoryHandle has the
+// same access rights as the original. Returns true on success, false
+// otherwise.
+CONTENT_EXPORT bool BrokerDuplicateSharedMemoryHandle(
+ const base::SharedMemoryHandle& source_handle,
+ base::ProcessId target_process_id,
+ base::SharedMemoryHandle* target_handle);
+#endif // defined(OS_WIN) || defined(OS_MACOSX)
+
#if defined(OS_WIN)
// Initialize the sandbox for renderer, gpu, utility, worker, nacl, and plugin
« no previous file with comments | « content/common/sandbox_init_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698