Chromium Code Reviews| 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/win/scoped_handle.h" | |
|
erikwright (departed)
2012/10/03 15:58:35
forward-decl
huangs
2012/10/03 20:09:47
The definition was
typedef GenericScopedHandle<Ha
| |
| 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 FilePath GetAnyAppHostPath(); | |
|
erikwright (departed)
2012/10/03 15:58:35
Add behaviour analogous to GetAnyChromePath's:
//
huangs
2012/10/03 20:09:47
Done.
| |
| 46 | |
| 47 // Returns true if App Host is installed (system-level or user-level). | |
|
erikwright (departed)
2012/10/03 15:58:35
or in the same directory as the current executable
huangs
2012/10/03 20:09:47
Done.
| |
| 48 bool IsAppHostPresent(); | |
| 49 | |
| 50 // Launches the Google Update command to quick-enable App Host. | |
| 51 // Returns true if the command is launched. | |
| 52 bool LaunchQuickEnableAppHost(base::win::ScopedHandle* process); | |
| 53 | |
| 35 } // namespace chrome_launcher_support | 54 } // namespace chrome_launcher_support |
| 36 | 55 |
| 37 #endif // CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ | 56 #endif // CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_ |
| OLD | NEW |