summaryrefslogtreecommitdiffstats
path: root/content/renderer/renderer_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/renderer/renderer_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/renderer/renderer_main.cc')
-rw-r--r--content/renderer/renderer_main.cc8
1 files changed, 5 insertions, 3 deletions
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);