diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-14 22:05:53 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-14 22:05:53 +0000 |
commit | 4f99782b60caec061f62def550f0ef16a2d42bd0 (patch) | |
tree | 1643090b5459bfe416c1f3619d295340390808ca /content/worker/worker_main.cc | |
parent | 7c98f742868a5c44ae5586949da15b52918e3f60 (diff) | |
download | chromium_src-4f99782b60caec061f62def550f0ef16a2d42bd0.zip chromium_src-4f99782b60caec061f62def550f0ef16a2d42bd0.tar.gz chromium_src-4f99782b60caec061f62def550f0ef16a2d42bd0.tar.bz2 |
WorkerMain contains code to initialize the sandbox on OS X which is disabled due to a typo. The sandbox is in fact enabled in ContentMainImpl::Initialize.
This CL removes the redundant code and adds a CHECK() to ensure that the sandbox has already been initialized.
Bug=None
Review URL: https://chromiumcodereview.appspot.com/12820006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188209 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/worker/worker_main.cc')
-rw-r--r-- | content/worker/worker_main.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/content/worker/worker_main.cc b/content/worker/worker_main.cc index f6b2b20..192cc57 100644 --- a/content/worker/worker_main.cc +++ b/content/worker/worker_main.cc @@ -18,6 +18,10 @@ #include "sandbox/win/src/sandbox.h" #endif +#if defined(OS_MACOSX) +#include "content/common/sandbox_mac.h" +#endif + namespace content { // Mainline routine for running as the worker process. @@ -43,10 +47,9 @@ int WorkerMain(const MainFunctionParams& parameters) { ::GetUserDefaultLCID(); target_services->LowerToken(); -#elif defined(OS_MAC) - // On OS X, if the sandbox fails to initialize, something has gone terribly - // wrong and we should die. - CHECK(InitializeSandbox()); +#elif defined(OS_MACOSX) + // Sandbox should already be activated at this point. + CHECK(Sandbox::SandboxIsCurrentlyActive()); #elif defined(OS_LINUX) // On Linux, the sandbox must be initialized early, before any thread is // created. |