From badf5cf5f14c65f6c799ef1fec77cde8351339c2 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Sat, 29 Oct 2011 03:44:44 +0000 Subject: 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 --- content/renderer/renderer_main.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'content/renderer/renderer_main.cc') diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc index b5147c5..8d21de0 100644 --- a/content/renderer/renderer_main.cc +++ b/content/renderer/renderer_main.cc @@ -5,7 +5,6 @@ #include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/i18n/rtl.h" -#include "base/mac/scoped_nsautorelease_pool.h" #include "base/memory/ref_counted.h" #include "base/metrics/field_trial.h" #include "base/message_loop.h" @@ -33,6 +32,7 @@ #include <unistd.h> #include "base/mac/mac_util.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "third_party/mach_override/mach_override.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #endif // OS_MACOSX @@ -124,10 +124,10 @@ class RendererMessageLoopObserver : public MessageLoop::TaskObserver { int RendererMain(const MainFunctionParams& parameters) { TRACE_EVENT_BEGIN_ETW("RendererMain", 0, ""); - const CommandLine& parsed_command_line = parameters.command_line_; - base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; + const CommandLine& parsed_command_line = parameters.command_line; #if defined(OS_MACOSX) + base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool; InstallFrameworkHacks(); #endif // OS_MACOSX @@ -222,8 +222,10 @@ int RendererMain(const MainFunctionParams& parameters) { startup_timer.Stop(); // End of Startup Time Measurement. if (run_loop) { +#if defined(OS_MACOSX) if (pool) pool->Recycle(); +#endif TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); MessageLoop::current()->Run(); TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); -- cgit v1.1