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