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

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

Issue 423293004: Move app_installer into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git cl format Created 6 years, 2 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') | third_party/omaha/LICENSE » ('j') | 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 9574ae13560cf43a2bf997aae0bd3983127c6bee..8d052a9b88a5efe36a9eed2a21e786147d93379f 100644
--- a/chrome/installer/launcher_support/chrome_launcher_support.cc
+++ b/chrome/installer/launcher_support/chrome_launcher_support.cc
@@ -25,6 +25,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 kChromeExe[] = L"chrome.exe";
const wchar_t kUninstallStringField[] = L"UninstallString";
@@ -99,6 +102,13 @@ base::FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path,
return base::FilePath();
}
+// Returns the path to an installed SxS chrome.exe at the specified level, if
+// it can be found via Omaha client state.
+base::FilePath GetChromeSxSPathForInstallationLevel(InstallationLevel level) {
+ return FindExeRelativeToSetupExe(
+ GetSetupExeFromRegistry(level, kSxSBrowserAppGuid), kChromeExe);
+}
+
} // namespace
base::FilePath GetChromePathForInstallationLevel(InstallationLevel level) {
@@ -115,4 +125,12 @@ base::FilePath GetAnyChromePath() {
return chrome_path;
}
+base::FilePath GetAnyChromeSxSPath() {
+ base::FilePath path =
+ GetChromeSxSPathForInstallationLevel(USER_LEVEL_INSTALLATION);
Matt Giuca 2014/10/30 02:33:07 Is there a reason this prioritizes user-level inst
Matt Giuca 2014/10/30 02:55:44 Just asked the same question on: https://coderevie
+ if (path.empty())
+ path = GetChromeSxSPathForInstallationLevel(SYSTEM_LEVEL_INSTALLATION);
+ return path;
+}
+
} // namespace chrome_launcher_support
« no previous file with comments | « chrome/installer/launcher_support/chrome_launcher_support.h ('k') | third_party/omaha/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698