| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ | 5 #ifndef CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ |
| 6 #define CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ | 6 #define CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ |
| 7 | 7 |
| 8 class FilePath; | 8 class FilePath; |
| 9 | 9 |
| 10 namespace chrome_launcher_support { | 10 namespace chrome_launcher_support { |
| 11 | 11 |
| 12 enum InstallationLevel { | 12 enum InstallationLevel { |
| 13 USER_LEVEL_INSTALLATION, | 13 USER_LEVEL_INSTALLATION, |
| 14 SYSTEM_LEVEL_INSTALLATION | 14 SYSTEM_LEVEL_INSTALLATION |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 // Returns the path to an existing setup.exe at the specified level, if it can | 17 // Returns the path to an existing setup.exe at the specified level, if it can |
| 18 // be found via Omaha client state. | 18 // be found via Omaha client state. |
| 19 FilePath GetSetupExeForInstallationLevel(InstallationLevel level); | 19 FilePath GetSetupExeForInstallationLevel(InstallationLevel level); |
| 20 | 20 |
| 21 // Returns the path to an installed chrome.exe at the specified level, if it can | 21 // Returns the path to an installed chrome.exe at the specified level, if it can |
| 22 // be found via Omaha client state. Prefers the installer from a multi-install, | 22 // be found via Omaha client state. Prefers the installer from a multi-install, |
| 23 // but may also return that of a single-install of Chrome if no multi-install | 23 // but may also return that of a single-install of Chrome if no multi-install |
| 24 // exists. | 24 // exists. |
| 25 FilePath GetChromePathForInstallationLevel(InstallationLevel level); | 25 FilePath GetChromePathForInstallationLevel(InstallationLevel level); |
| 26 | 26 |
| 27 // Returns the path to an installed app_host.exe at the specified level, if |
| 28 // it can be found via Omaha client state. |
| 29 FilePath GetAppHostPathForInstallationLevel(InstallationLevel level); |
| 30 |
| 27 // Returns the path to an installed chrome.exe, or an empty path. Prefers a | 31 // Returns the path to an installed chrome.exe, or an empty path. Prefers a |
| 28 // system-level installation to a user-level installation. Uses Omaha client | 32 // system-level installation to a user-level installation. Uses Omaha client |
| 29 // state to identify a Chrome installation location. | 33 // state to identify a Chrome installation location. |
| 30 // In non-official builds, to ease development, this will first look for a | 34 // In non-official builds, to ease development, this will first look for a |
| 31 // chrome.exe in the same directory as the current executable. | 35 // chrome.exe in the same directory as the current executable. |
| 32 // The file path returned (if any) is guaranteed to exist. | 36 // The file path returned (if any) is guaranteed to exist. |
| 33 FilePath GetAnyChromePath(); | 37 FilePath GetAnyChromePath(); |
| 34 | 38 |
| 39 // Returns the path to an installed app_host.exe, or an empty path. Prefers a |
| 40 // system-level installation to a user-level installation. Uses Omaha client |
| 41 // state to identify a App Host installation location. |
| 42 // In non-official builds, to ease development, this will first look for a |
| 43 // app_host.exe in the same directory as the current executable. |
| 44 // The file path returned (if any) is guaranteed to exist. |
| 45 FilePath GetAnyAppHostPath(); |
| 46 |
| 47 // Returns true if App Host is installed (system-level or user-level), |
| 48 // or in the same directory as the current executable. |
| 49 bool IsAppHostPresent(); |
| 50 |
| 35 } // namespace chrome_launcher_support | 51 } // namespace chrome_launcher_support |
| 36 | 52 |
| 37 #endif // CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ | 53 #endif // CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ |
| OLD | NEW |