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
diff --git a/base/message_pump_libevent.cc b/base/message_pump_libevent.cc
index 9bef229..23b707e 100644
--- a/base/message_pump_libevent.cc
+++ b/base/message_pump_libevent.cc
@@ -11,7 +11,6 @@
#include "base/compiler_specific.h"
#include "base/eintr_wrapper.h"
#include "base/logging.h"
-#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/time.h"
@@ -21,6 +20,10 @@
#include "third_party/libevent/event.h"
#endif
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#endif
+
// Lifecycle of struct event
// Libevent uses two main data structures:
// struct event_base (of which there is one per message pump), and
@@ -228,7 +231,9 @@
scoped_ptr<event> timer_event(new event);
for (;;) {
+#if defined(OS_MACOSX)
mac::ScopedNSAutoreleasePool autorelease_pool;
+#endif
bool did_work = delegate->DoWork();
if (!keep_running_)