summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_exe_main_gtk.cc
diff options
context:
space:
mode:
authorprasadt@chromium.org <prasadt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 00:57:48 +0000
committerprasadt@chromium.org <prasadt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 00:57:48 +0000
commit2ce1d31d6c4c46ad185c49fbe8496396694f57c7 (patch)
tree63cb38f8c0cea76664ebc2d4f5e08237d5ef33df /chrome/app/chrome_exe_main_gtk.cc
parentcd92d9ae828e3054af4582e3da8302cf6ad19e2e (diff)
downloadchromium_src-2ce1d31d6c4c46ad185c49fbe8496396694f57c7.zip
chromium_src-2ce1d31d6c4c46ad185c49fbe8496396694f57c7.tar.gz
chromium_src-2ce1d31d6c4c46ad185c49fbe8496396694f57c7.tar.bz2
Detect new instance of the browser when running in the background in persistent
mode, shutdown and restart the new instance. This is already done for Windows, this CL enables the functionality for Linux. We don't yet have a unit test for this. Local testing is done by: 1) Reducing the timer to 30 seconds. 2) Changing BrowserList::IsInPersistentMode to return true. 3) Setting BrowserProcessImpl::autoupdate_timer_ to 30 seconds interval. 4) Running "touch" command on chrome exe to pretend there is an update. BUG=40975 TEST=none Review URL: http://codereview.chromium.org/1633021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_exe_main_gtk.cc')
-rw-r--r--chrome/app/chrome_exe_main_gtk.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/app/chrome_exe_main_gtk.cc b/chrome/app/chrome_exe_main_gtk.cc
index 0ed9e15..8b612c7 100644
--- a/chrome/app/chrome_exe_main_gtk.cc
+++ b/chrome/app/chrome_exe_main_gtk.cc
@@ -4,6 +4,7 @@
#include "base/at_exit.h"
#include "base/process_util.h"
+#include "chrome/browser/first_run.h"
// The entry point for all invocations of Chromium, browser and renderer. On
// windows, this does nothing but load chrome.dll and invoke its entry point in
@@ -44,5 +45,11 @@ int main(int argc, const char** argv) {
// keep it.
// base::AtExitManager exit_manager;
- return ChromeMain(argc, argv);
+ int return_code = ChromeMain(argc, argv);
+
+ // Launch a new instance if we're shutting down because we detected an
+ // upgrade in the persistent mode.
+ Upgrade::RelaunchChromeBrowserWithNewCommandLineIfNeeded();
+
+ return return_code;
}