summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main_win.cc
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 01:18:35 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 01:18:35 +0000
commit2e9dd2bea28b067a7bd1c50ac0816720af28d26e (patch)
treecc2e5ce80c2de226b4661ab49e4f9c6c5913c03b /chrome/browser/browser_main_win.cc
parent7586047e07d99aa496c90b37a08a8e6e43719d16 (diff)
downloadchromium_src-2e9dd2bea28b067a7bd1c50ac0816720af28d26e.zip
chromium_src-2e9dd2bea28b067a7bd1c50ac0816720af28d26e.tar.gz
chromium_src-2e9dd2bea28b067a7bd1c50ac0816720af28d26e.tar.bz2
Revert 43989 - This is a new version of the older patch. Main changes include:
1. Rebased to a never Git revision to make things easier to land. 2. Chrome will now preserve the command line switches except for those that are blacklisted. 3. Fixed a race condition that would cause the browser to think it didn't exit cleanly after it's been restarted. 4. Fixed minor nits and omissions (indentation, etc). This patch adds a timer which fires every 6 hours and checks whether the browser is in the "persistent" (background) mode, and whether there's an update pending restart. If both conditions are true, the browser is restarted with blacklisted command line keys and all loose values stripped. In order to restart the browser in the background mode, the longlivedextensions key is also added to the command line. This change is Windowsonly, and it won't become fully functional until Drew (atwilson) checks in his work that enables Chrome to go into background. Review URL: http://codereview.chromium.org/1617001 TBR=atwilson@chromium.org Review URL: http://codereview.chromium.org/1517027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_win.cc')
-rw-r--r--chrome/browser/browser_main_win.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index b10236d..7b681e5 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -17,7 +17,6 @@
#include "base/i18n/rtl.h"
#include "base/path_service.h"
#include "base/win_util.h"
-#include "chrome/browser/browser_list.h"
#include "chrome/browser/first_run.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/views/uninstall_view.h"
@@ -201,3 +200,14 @@ bool CheckMachineLevelInstall() {
}
return false;
}
+
+bool DoUpgradeTasks(const CommandLine& command_line) {
+ if (!Upgrade::SwapNewChromeExeIfPresent())
+ return false;
+ // At this point the chrome.exe has been swapped with the new one.
+ if (!Upgrade::RelaunchChromeBrowser(command_line)) {
+ // The re-launch fails. Feel free to panic now.
+ NOTREACHED();
+ }
+ return true;
+}