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 #pragma once 8 9 class CommandLine; 10 11 namespace upgrade_util { 12 13 void SetNewCommandLine(CommandLine* new_command_line); 14 15 // Launches a new instance of the browser if the current instance in persistent 16 // mode an upgrade is detected. 17 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 18 19 // Launches chrome again simulating a 'user' launch. If chrome could not be 20 // launched the return is false. 21 bool RelaunchChromeBrowser(const CommandLine& command_line); 22 23 // Windows: 24 // Checks if chrome_new.exe is present in the current instance's install. 25 // Linux: 26 // Checks if the last modified time of chrome is newer than that of the current 27 // running instance. 28 bool IsUpdatePendingRestart(); 29 30 } // namespace upgrade_util 31 32 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ 33