summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_main.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-29 03:44:44 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-29 03:44:44 +0000
commitbadf5cf5f14c65f6c799ef1fec77cde8351339c2 (patch)
tree83690887c035e4b457f00404f126f95ad1a90c06 /content/browser/browser_main.cc
parent8cc9738eff9c169487e8356947d88640659fc497 (diff)
downloadchromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.zip
chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.gz
chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.bz2
Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing this.
-got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo -got rid of the duplicated code to initialize the broker -since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs. BUG=98716 Review URL: http://codereview.chromium.org/8414020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_main.cc')
-rw-r--r--content/browser/browser_main.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/content/browser/browser_main.cc b/content/browser/browser_main.cc
index 3609290..c358f49 100644
--- a/content/browser/browser_main.cc
+++ b/content/browser/browser_main.cc
@@ -16,33 +16,10 @@
#if defined(OS_WIN)
#include "base/win/scoped_com_initializer.h"
-#include "content/common/sandbox_policy.h"
-#include "sandbox/src/sandbox.h"
#endif
namespace {
-#if defined(OS_WIN)
-// Windows-specific initialization code for the sandbox broker services.
-void InitializeBrokerServices(const MainFunctionParams& parameters,
- const CommandLine& parsed_command_line) {
- sandbox::BrokerServices* broker_services =
- parameters.sandbox_info_.BrokerServices();
- if (broker_services) {
- sandbox::InitBrokerServices(broker_services);
- if (!parsed_command_line.HasSwitch(switches::kNoSandbox)) {
- bool use_winsta = !parsed_command_line.HasSwitch(
- switches::kDisableAltWinstation);
- // Precreate the desktop and window station used by the renderers.
- sandbox::TargetPolicy* policy = broker_services->CreatePolicy();
- sandbox::ResultCode result = policy->CreateAlternateDesktop(use_winsta);
- CHECK(sandbox::SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION != result);
- policy->Release();
- }
- }
-}
-#endif
-
bool g_exited_main_message_loop = false;
} // namespace
@@ -106,11 +83,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
// Make this call before going multithreaded, or spawning any subprocesses.
base::allocator::SetupSubprocessAllocator();
#endif
- // The broker service initialization needs to run early because it will
- // initialize the sandbox broker, which requires the process to swap its
- // window station. During this time all the UI will be broken. This has to
- // run before threads and windows are created.
- InitializeBrokerServices(parameters, parameters.command_line_);
base::win::ScopedCOMInitializer com_initializer;
#endif // OS_WIN