summaryrefslogtreecommitdiffstats
path: root/chrome/common/sandbox_init_wrapper.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-04 18:20:17 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-04 18:20:17 +0000
commit0d5529391070e6d4ad1093f02c4491f2b2854ebf (patch)
tree7d7f06698657f06d451321e6c73d59cb00cdd3f4 /chrome/common/sandbox_init_wrapper.cc
parentcd115c31a6cddacccb8f4958dd7afb2395d2d674 (diff)
downloadchromium_src-0d5529391070e6d4ad1093f02c4491f2b2854ebf.zip
chromium_src-0d5529391070e6d4ad1093f02c4491f2b2854ebf.tar.gz
chromium_src-0d5529391070e6d4ad1093f02c4491f2b2854ebf.tar.bz2
Revert "Make chrome/renderer/render_main.cc cross-platform + OS X bringup."
This reverts commit r9141. TBR=jeremy Review URL: http://codereview.chromium.org/21049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/sandbox_init_wrapper.cc')
-rw-r--r--chrome/common/sandbox_init_wrapper.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/chrome/common/sandbox_init_wrapper.cc b/chrome/common/sandbox_init_wrapper.cc
index e7228aa..f72c2df 100644
--- a/chrome/common/sandbox_init_wrapper.cc
+++ b/chrome/common/sandbox_init_wrapper.cc
@@ -7,6 +7,12 @@
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
+#if defined(OS_MACOSX)
+extern "C" {
+#include <sandbox.h>
+}
+#endif
+
#if defined(OS_WIN)
void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) {
@@ -31,8 +37,13 @@ void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
#if defined(OS_WIN)
target_services_->Init();
#elif defined(OS_MACOSX)
- // Nothing to do here for OS X, see renderer_main_platform_delegate_mac.cc
- // For Sandbox initialization.
+ // TODO(pinkerton): note, this leaks |error_buff|. What do we want to
+ // do with the error? Pass it back to main?
+ char* error_buff;
+ int error = sandbox_init(kSBXProfilePureComputation, SANDBOX_NAMED,
+ &error_buff);
+ if (error)
+ exit(-1);
#endif
}
}