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

Side by Side Diff: content/public/common/sandbox_init.h

Issue 13814027: Linux: make current InitializeSandbox() private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove sandbox_init_linux.cc Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
6 #define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ 6 #define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
7 7
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // embedder is queried using ContentClient::GetSandboxPolicyForSandboxType(). 71 // embedder is queried using ContentClient::GetSandboxPolicyForSandboxType().
72 // The embedder can use values for |sandbox_type| starting from 72 // The embedder can use values for |sandbox_type| starting from
73 // sandbox::SANDBOX_PROCESS_TYPE_AFTER_LAST_TYPE. 73 // sandbox::SANDBOX_PROCESS_TYPE_AFTER_LAST_TYPE.
74 // 74 //
75 // Returns true if the sandbox was initialized succesfully, false if an error 75 // Returns true if the sandbox was initialized succesfully, false if an error
76 // occurred. If process_type isn't one that needs sandboxing, no action is 76 // occurred. If process_type isn't one that needs sandboxing, no action is
77 // taken and true is always returned. 77 // taken and true is always returned.
78 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type, 78 CONTENT_EXPORT bool InitializeSandbox(int sandbox_type,
79 const base::FilePath& allowed_path); 79 const base::FilePath& allowed_path);
80 80
81 #elif defined(OS_LINUX)
82
83 // Initialize the sandbox (currently seccomp-legacy or seccomp-bpf, the setuid
84 // sandbox works differently and is set-up in the Zygote).
85 // The process sandbox type is determined at run time via the command line
86 // switches. TODO(jln): switch to a model where the caller chooses a sandbox
87 // type.
88 // This should be called before any additional thread has been created.
89 //
90 // Returns true if a sandbox has been initialized successfully, false
91 // otherwise.
92 CONTENT_EXPORT bool InitializeSandbox();
93
94 #endif 81 #endif
95 82
96 } // namespace content 83 } // namespace content
97 84
98 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_ 85 #endif // CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_plugin_main.cc ('k') | content/renderer/renderer_main_platform_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698