summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/first_run_win.cc')
-rw-r--r--chrome/browser/first_run_win.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc
index 0620baa..932bbc5 100644
--- a/chrome/browser/first_run_win.cc
+++ b/chrome/browser/first_run_win.cc
@@ -444,6 +444,26 @@ bool Upgrade::SwapNewChromeExeIfPresent() {
return false;
}
+// static
+bool Upgrade::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;
+}
+
+// static
+bool Upgrade::IsUpdatePendingRestart() {
+ std::wstring new_chrome_exe;
+ if (!GetNewerChromeFile(&new_chrome_exe))
+ return false;
+ return file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe));
+}
+
bool OpenFirstRunDialog(Profile* profile,
bool homepage_defined,
int import_items,