Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3625)

Unified Diff: chrome/installer/launcher_support/chrome_launcher_support.cc

Issue 200713003: Add GetAnyChromeSxSPath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/launcher_support/chrome_launcher_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fdac65c6584d16e075ab45fde5671434282b83ae 100644
--- a/chrome/installer/launcher_support/chrome_launcher_support.cc
+++ b/chrome/installer/launcher_support/chrome_launcher_support.cc
@@ -38,6 +38,9 @@ const wchar_t kBinariesAppGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}";
// Copied from google_chrome_distribution.cc.
const wchar_t kBrowserAppGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}";
+// Copied frome google_chrome_sxs_distribution.cc.
+const wchar_t kSxSBrowserAppGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}";
+
// Copied from util_constants.cc.
const wchar_t kChromeAppHostExe[] = L"app_host.exe";
const char kChromeAppLauncher[] = "app-launcher";
@@ -170,6 +173,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 +198,14 @@ base::FilePath GetAnyAppHostPath() {
return app_host_path;
}
+base::FilePath GetAnyChromeSxSPath() {
+ base::FilePath path =
+ GetChromeSxSPathForInstallationLevel(USER_LEVEL_INSTALLATION);
+ if (path.empty())
+ path = GetChromeSxSPathForInstallationLevel(SYSTEM_LEVEL_INSTALLATION);
+ return path;
+}
+
bool IsAppHostPresent() {
base::FilePath app_host_exe = GetAnyAppHostPath();
return !app_host_exe.empty();
« no previous file with comments | « chrome/installer/launcher_support/chrome_launcher_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698