• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_
6 #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_
7 
8 namespace base {
9 class CommandLine;
10 }
11 
12 namespace upgrade_util {
13 
14 // If the new_chrome.exe exists (placed by the installer then is swapped
15 // to chrome.exe and the old chrome is renamed to old_chrome.exe. If there
16 // is no new_chrome.exe or the swap fails the return is false;
17 bool SwapNewChromeExeIfPresent();
18 
19 // Returns true if the currently running chrome.exe has been renamed to
20 // old_chrome.exe. This means that the running executable is out of date and
21 // has been renamed by the in-use update process. old_chrome.exe shouldn't
22 // continue on and run as the browser process since it may end up launching
23 // newer chrome.exes as child processes resulting in a version mismatch.
24 bool IsRunningOldChrome();
25 
26 // Combines the two methods, RelaunchChromeBrowser and
27 // SwapNewChromeExeIfPresent, to perform the rename and relaunch of
28 // the browser. Note that relaunch does NOT exit the existing browser process.
29 // If this is called before message loop is executed, simply exit the main
30 // function. If browser is already running, you will need to exit it.
31 bool DoUpgradeTasks(const base::CommandLine& command_line);
32 
33 }  // namespace upgrade_util
34 
35 #endif  // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_
36