summaryrefslogtreecommitdiffstats
path: root/remoting/host/simple_host_process.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 /remoting/host/simple_host_process.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 'remoting/host/simple_host_process.cc')
-rw-r--r--remoting/host/simple_host_process.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index c527b24..533a94c 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -26,7 +26,6 @@
#include "base/environment.h"
#include "base/file_path.h"
#include "base/logging.h"
-#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/test/mock_chrome_application_mac.h"
@@ -51,9 +50,9 @@
#if defined(TOOLKIT_USES_GTK)
#include "ui/gfx/gtk_util.h"
-#endif
-
-#if defined(OS_WIN)
+#elif defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#elif defined(OS_WIN)
// TODO(garykac) Make simple host into a proper GUI app on Windows so that we
// have an hModule for the dialog resource.
HMODULE g_hModule = NULL;
@@ -261,8 +260,11 @@ class SimpleHost {
};
int main(int argc, char** argv) {
- // Needed for the Mac, so we don't leak objects when threads are created.
+#if defined(OS_MACOSX)
+ // Needed so we don't leak objects when threads are created.
base::mac::ScopedNSAutoreleasePool pool;
+ mock_cr_app::RegisterMockCrApp();
+#endif
CommandLine::Init(argc, argv);
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
@@ -274,10 +276,6 @@ int main(int argc, char** argv) {
gfx::GtkInitFromCommandLine(*cmd_line);
#endif // TOOLKIT_USES_GTK
-#if defined(OS_MACOSX)
- mock_cr_app::RegisterMockCrApp();
-#endif // OS_MACOSX
-
SimpleHost simple_host;
if (cmd_line->HasSwitch(kConfigSwitchName)) {