| 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_ANDROID) || defined(OS_CHROMEOS) |
| 11 #error Not used on Android or ChromeOS |
| 12 #endif |
| 13 |
| 10 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 11 #include <string> | 15 #include <string> |
| 12 #endif | 16 #endif |
| 13 | 17 |
| 14 #if !defined(OS_CHROMEOS) | |
| 15 | |
| 16 namespace base { | 18 namespace base { |
| 17 class CommandLine; | 19 class CommandLine; |
| 18 } | 20 } |
| 19 | 21 |
| 20 namespace upgrade_util { | 22 namespace upgrade_util { |
| 21 | 23 |
| 22 // Launches Chrome again simulating a "user" launch. If Chrome could not be | 24 // Launches Chrome again simulating a "user" launch. If Chrome could not be |
| 23 // launched, returns false. | 25 // launched, returns false. |
| 24 bool RelaunchChromeBrowser(const base::CommandLine& command_line); | 26 bool RelaunchChromeBrowser(const base::CommandLine& command_line); |
| 25 | 27 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 38 | 40 |
| 39 std::string RelaunchModeEnumToString(const RelaunchMode& relaunch_mode); | 41 std::string RelaunchModeEnumToString(const RelaunchMode& relaunch_mode); |
| 40 | 42 |
| 41 RelaunchMode RelaunchModeStringToEnum(const std::string& relaunch_mode); | 43 RelaunchMode RelaunchModeStringToEnum(const std::string& relaunch_mode); |
| 42 | 44 |
| 43 // Like RelaunchChromeBrowser() but for Windows 8 it will read pref and restart | 45 // Like RelaunchChromeBrowser() but for Windows 8 it will read pref and restart |
| 44 // chrome accordingly in desktop or metro mode. | 46 // chrome accordingly in desktop or metro mode. |
| 45 bool RelaunchChromeWithMode(const base::CommandLine& command_line, | 47 bool RelaunchChromeWithMode(const base::CommandLine& command_line, |
| 46 const RelaunchMode& relaunch_mode); | 48 const RelaunchMode& relaunch_mode); |
| 47 | 49 |
| 48 #endif | 50 #endif // defined(OS_WIN) |
| 49 | 51 |
| 50 #if !defined(OS_MACOSX) | 52 #if !defined(OS_MACOSX) |
| 51 | 53 |
| 52 void SetNewCommandLine(base::CommandLine* new_command_line); | 54 void SetNewCommandLine(base::CommandLine* new_command_line); |
| 53 | 55 |
| 54 // Launches a new instance of the browser if the current instance in persistent | 56 // Launches a new instance of the browser if the current instance in persistent |
| 55 // mode an upgrade is detected. | 57 // mode an upgrade is detected. |
| 56 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 58 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
| 57 | 59 |
| 58 // Windows: | 60 // Windows: |
| 59 // Checks if chrome_new.exe is present in the current instance's install. | 61 // Checks if chrome_new.exe is present in the current instance's install. |
| 60 // Linux: | 62 // Linux: |
| 61 // Checks if the last modified time of chrome is newer than that of the current | 63 // Checks if the last modified time of chrome is newer than that of the current |
| 62 // running instance. | 64 // running instance. |
| 63 bool IsUpdatePendingRestart(); | 65 bool IsUpdatePendingRestart(); |
| 64 | 66 |
| 65 #endif // !defined(OS_MACOSX) | 67 #endif // !defined(OS_MACOSX) |
| 66 | 68 |
| 67 } // namespace upgrade_util | 69 } // namespace upgrade_util |
| 68 | 70 |
| 69 #endif // !defined(OS_CHROMEOS) | |
| 70 | |
| 71 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ | 71 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_H_ |
| OLD | NEW |