Chromium Code Reviews| Index: chrome/installer/launcher_support/chrome_launcher_support.cc |
| diff --git a/chrome/installer/launcher_support/chrome_launcher_support.cc b/chrome/installer/launcher_support/chrome_launcher_support.cc |
| index c28bf9977fe403abb101b0da3718902fee2798b4..43dc53803c200be34933e862739de5f04bb4f2a8 100644 |
| --- a/chrome/installer/launcher_support/chrome_launcher_support.cc |
| +++ b/chrome/installer/launcher_support/chrome_launcher_support.cc |
| @@ -34,6 +34,7 @@ const wchar_t kAppHostAppId[] = L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}"; |
| // Copied from chrome_appid.cc. |
| const wchar_t kBinariesAppGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; |
| +const wchar_t kSxSBrowserAppGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}"; |
|
grt (UTC plus 2)
2014/03/18 13:51:06
nit: document this as "Coped from google_chrome_sx
jackhou1
2014/03/18 23:39:10
Done.
|
| // Copied from google_chrome_distribution.cc. |
| const wchar_t kBrowserAppGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; |
| @@ -170,6 +171,11 @@ base::FilePath GetAppHostPathForInstallationLevel(InstallationLevel level) { |
| GetSetupExeFromRegistry(level, kAppHostAppId), kChromeAppHostExe); |
| } |
| +base::FilePath GetChromeSxSPathForInstallationLevel(InstallationLevel level) { |
| + return FindExeRelativeToSetupExe( |
| + GetSetupExeFromRegistry(level, kSxSBrowserAppGuid), kChromeExe); |
| +} |
| + |
| base::FilePath GetAnyChromePath() { |
| base::FilePath chrome_path; |
| if (chrome_path.empty()) |
| @@ -190,6 +196,15 @@ base::FilePath GetAnyAppHostPath() { |
| return app_host_path; |
| } |
| +base::FilePath GetAnyChromeSxSPath() { |
| + base::FilePath path; |
| + if (path.empty()) |
| + path = GetChromeSxSPathForInstallationLevel(SYSTEM_LEVEL_INSTALLATION); |
| + if (path.empty()) |
| + path = GetChromeSxSPathForInstallationLevel(USER_LEVEL_INSTALLATION); |
| + return path; |
| +} |
| + |
| bool IsAppHostPresent() { |
| base::FilePath app_host_exe = GetAnyAppHostPath(); |
| return !app_host_exe.empty(); |