From 2ce1d31d6c4c46ad185c49fbe8496396694f57c7 Mon Sep 17 00:00:00 2001 From: "prasadt@chromium.org" Date: Fri, 30 Apr 2010 00:57:48 +0000 Subject: 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 --- chrome/browser/browser_process.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'chrome/browser/browser_process.h') diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h index e6f6eb3..91614b6 100644 --- a/chrome/browser/browser_process.h +++ b/chrome/browser/browser_process.h @@ -139,8 +139,7 @@ class BrowserProcess { // disk. virtual void CheckForInspectorFiles() = 0; -#if defined(OS_WIN) - +#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) // This will start a timer that, if Chrome is in persistent mode, will check // whether an update is available, and if that's the case, restart the // browser. Note that restart code will strip some of the command line keys @@ -149,8 +148,7 @@ class BrowserProcess { // background mode. For the full list of "blacklisted" keys, refer to // |kSwitchesToRemoveOnAutorestart| array in browser_process_impl.cc. virtual void StartAutoupdateTimer() = 0; - -#endif // OS_WIN +#endif // Return true iff we found the inspector files on disk. It's possible to // call this function before we have a definite answer from the disk. In that -- cgit v1.1