| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if !defined(OS_CHROMEOS) | 10 #if !defined(OS_CHROMEOS) |
| 11 | 11 |
| 12 class CommandLine; | 12 class CommandLine; |
| 13 | 13 |
| 14 namespace upgrade_util { | 14 namespace upgrade_util { |
| 15 | 15 |
| 16 // Launches Chrome again simulating a "user" launch. If Chrome could not be | 16 // Launches Chrome again simulating a "user" launch. If Chrome could not be |
| 17 // launched, returns false. | 17 // launched, returns false. |
| 18 bool RelaunchChromeBrowser(const CommandLine& command_line); | 18 bool RelaunchChromeBrowser(const CommandLine& command_line); |
| 19 | 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 |
| 20 #if !defined(OS_MACOSX) | 28 #if !defined(OS_MACOSX) |
| 21 | 29 |
| 22 void SetNewCommandLine(CommandLine* new_command_line); | 30 void SetNewCommandLine(CommandLine* new_command_line); |
| 23 | 31 |
| 24 // Launches a new instance of the browser if the current instance in persistent | 32 // Launches a new instance of the browser if the current instance in persistent |
| 25 // mode an upgrade is detected. | 33 // mode an upgrade is detected. |
| 26 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 34 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
| 27 | 35 |
| 28 // Windows: | 36 // Windows: |
| 29 // Checks if chrome_new.exe is present in the current instance's install. | 37 // Checks if chrome_new.exe is present in the current instance's install. |
| 30 // Linux: | 38 // Linux: |
| 31 // Checks if the last modified time of chrome is newer than that of the current | 39 // Checks if the last modified time of chrome is newer than that of the current |
| 32 // running instance. | 40 // running instance. |
| 33 bool IsUpdatePendingRestart(); | 41 bool IsUpdatePendingRestart(); |
| 34 | 42 |
| 35 #endif // !defined(OS_MACOSX) | 43 #endif // !defined(OS_MACOSX) |
| 36 | 44 |
| 37 } // namespace upgrade_util | 45 } // namespace upgrade_util |
| 38 | 46 |
| 39 #endif // !defined(OS_CHROMEOS) | 47 #endif // !defined(OS_CHROMEOS) |
| 40 | 48 |
| 41 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ | 49 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ |
| OLD | NEW |