summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 23:59:32 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 23:59:32 +0000
commit8418af407536ff0b31d28742b4b4bb19b9490a20 (patch)
treeb6beb338ad67a397c9a20758779c82e3e9c11eab /chrome/browser/browser_init.cc
parenta5652c5c71ec520a0acdacb868eef7f0b86e4032 (diff)
downloadchromium_src-8418af407536ff0b31d28742b4b4bb19b9490a20.zip
chromium_src-8418af407536ff0b31d28742b4b4bb19b9490a20.tar.gz
chromium_src-8418af407536ff0b31d28742b4b4bb19b9490a20.tar.bz2
BackgroundModeManager is now responsible for KeepAlive for --no-startup-window
Updated BackgroundModeManager to keep the browser process alive until extensions finish loading. This fixes a race condition with the previous implementation of --no-startup-window which would let chrome exit if the message loop was re-entered before background apps were loaded. BUG=58083 TEST=run with --no-startup-window, make sure chrome starts Review URL: http://codereview.chromium.org/3664001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index bb8c5d0..c4c141f 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -638,14 +638,8 @@ void BrowserInit::LaunchWithProfile::ProcessLaunchURLs(
const std::vector<GURL>& urls_to_open) {
// If we're starting up in "background mode" (no open browser window) then
// don't open any browser windows.
- if (process_startup && command_line_.HasSwitch(switches::kNoStartupWindow)) {
- BrowserList::StartKeepAlive();
- // Keep the app alive while the system initializes, then allow it to
- // shutdown if no other module wants to keep it running.
- MessageLoop::current()->PostTask(
- FROM_HERE, NewRunnableFunction(BrowserList::EndKeepAlive));
+ if (process_startup && command_line_.HasSwitch(switches::kNoStartupWindow))
return;
- }
if (process_startup && ProcessStartupURLs(urls_to_open)) {
// ProcessStartupURLs processed the urls, nothing else to do.