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_H_ 6 #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ 7 8 #include "build/build_config.h" 9 10 #if !defined(OS_CHROMEOS) 11 12 class CommandLine; 13 14 namespace upgrade_util { 15 16 // Launches Chrome again simulating a "user" launch. If Chrome could not be 17 // launched, returns false. 18 bool RelaunchChromeBrowser(const CommandLine& command_line); 19 20 #if defined(OS_WIN) 21 22 // Like RelaunchChromeBrowser() but for Windows 8 if chrome is in desktop mode 23 // it launches chrome in metro mode, and vice-versa. 24 bool RelaunchChromeWithModeSwitch(const CommandLine& command_line); 25 26 #endif 27 28 #if !defined(OS_MACOSX) 29 30 void SetNewCommandLine(CommandLine* new_command_line); 31 32 // Launches a new instance of the browser if the current instance in persistent 33 // mode an upgrade is detected. 34 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 35 36 // Windows: 37 // Checks if chrome_new.exe is present in the current instance's install. 38 // Linux: 39 // Checks if the last modified time of chrome is newer than that of the current 40 // running instance. 41 bool IsUpdatePendingRestart(); 42 43 #endif // !defined(OS_MACOSX) 44 45 } // namespace upgrade_util 46 47 #endif // !defined(OS_CHROMEOS) 48 49 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ 50