| Index: content/public/common/sandbox_init.h
|
| diff --git a/content/public/common/sandbox_init.h b/content/public/common/sandbox_init.h
|
| index 26b7d38e607f104c0c29005de5c5b673a464386d..89523239f222ecad4511df6d7582980e1d9ed3f8 100644
|
| --- a/content/public/common/sandbox_init.h
|
| +++ b/content/public/common/sandbox_init.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -6,6 +6,7 @@
|
| #define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
|
| #pragma once
|
|
|
| +#include "base/process.h"
|
| #include "build/build_config.h"
|
| #include "content/common/content_export.h"
|
|
|
| @@ -20,6 +21,7 @@ class FilePath;
|
| namespace content {
|
|
|
| #if defined(OS_WIN)
|
| +
|
| // Initialize the sandbox for renderer, gpu, utility, worker, nacl, and plug-in
|
| // processes, depending on the command line flags. Although The browser process
|
| // is not sandboxed, this also needs to be called because it will initialize
|
| @@ -29,7 +31,19 @@ namespace content {
|
| // returned.
|
| CONTENT_EXPORT bool InitializeSandbox(
|
| sandbox::SandboxInterfaceInfo* sandbox_info);
|
| +
|
| +// This is a restricted version of Windows' DuplicateHandle() function
|
| +// that works inside the sandbox and can send handles but not retrieve
|
| +// them. Unlike DuplicateHandle(), it takes a process ID rather than
|
| +// a process handle. It returns true on success, false otherwise.
|
| +CONTENT_EXPORT bool BrokerDuplicateHandle(HANDLE source_handle,
|
| + DWORD target_process_id,
|
| + HANDLE* target_handle,
|
| + DWORD desired_access,
|
| + DWORD options);
|
| +
|
| #elif defined(OS_MACOSX)
|
| +
|
| // Initialize the sandbox of the given |sandbox_type|, optionally specifying a
|
| // directory to allow access to. Note specifying a directory needs to be
|
| // supported by the sandbox profile associated with the given |sandbox_type|.
|
| @@ -46,8 +60,11 @@ CONTENT_EXPORT bool InitializeSandbox(
|
| // taken and true is always returned.
|
| CONTENT_EXPORT bool InitializeSandbox(int sandbox_type,
|
| const FilePath& allowed_path);
|
| +
|
| #elif defined(OS_LINUX)
|
| +
|
| CONTENT_EXPORT void InitializeSandbox();
|
| +
|
| #endif
|
|
|
| } // namespace content
|
|
|