summaryrefslogtreecommitdiffstats
path: root/chrome/common/main_function_params.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 15:35:47 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 15:35:47 +0000
commit7c32108b22446be27129324ce41d32e9c909e379 (patch)
tree2b18444c829ae9155036ef3c55ab1fb645b9621e /chrome/common/main_function_params.h
parent54131d25aa7e887f89ba25851b983150cd1384a8 (diff)
downloadchromium_src-7c32108b22446be27129324ce41d32e9c909e379.zip
chromium_src-7c32108b22446be27129324ce41d32e9c909e379.tar.gz
chromium_src-7c32108b22446be27129324ce41d32e9c909e379.tar.bz2
Add Recycle() method to scoped autorelease pool to allow cleaning out any junk
created at startup before the main runloop. Correct quit on Mac to let the BrowserProcess shut down the event loop when its refcount goes to zero after cleaning up all browser windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/main_function_params.h')
-rw-r--r--chrome/common/main_function_params.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/common/main_function_params.h b/chrome/common/main_function_params.h
index 5537879..1a240c5 100644
--- a/chrome/common/main_function_params.h
+++ b/chrome/common/main_function_params.h
@@ -12,13 +12,19 @@
#include "base/command_line.h"
#include "chrome/common/sandbox_init_wrapper.h"
+namespace base {
+class ScopedNSAutoreleasePool;
+};
class Task;
struct MainFunctionParams {
- MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb)
- : command_line_(cl), sandbox_info_(sb), ui_task(NULL) { }
+ MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb,
+ base::ScopedNSAutoreleasePool* pool)
+ : command_line_(cl), sandbox_info_(sb), autorelease_pool_(pool),
+ ui_task(NULL) { }
const CommandLine& command_line_;
const SandboxInitWrapper& sandbox_info_;
+ base::ScopedNSAutoreleasePool* autorelease_pool_;
// Used by InProcessBrowserTest. If non-null BrowserMain schedules this
// task to run on the MessageLoop and BrowserInit is not invoked.
Task* ui_task;