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 1c95519c6e9e7f771c7769fd8e03b54c96b76440..e8bd45b7bb6be86360f1c484b880e9caf3a5ef0d 100644 |
--- a/chrome/installer/launcher_support/chrome_launcher_support.cc |
+++ b/chrome/installer/launcher_support/chrome_launcher_support.cc |
@@ -113,39 +113,29 @@ 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 the registry. |
-base::FilePath GetChromeSxSPathForInstallationLevel(InstallationLevel level) { |
+} // namespace |
+ |
+base::FilePath GetChromePathForInstallationLevel(InstallationLevel level, |
+ bool is_sxs) { |
+ if (is_sxs) { |
#if defined(GOOGLE_CHROME_BUILD) |
- return FindExeRelativeToSetupExe( |
- GetSetupExeFromRegistry(level, kSxSBrowserAppGuid), kChromeExe); |
+ return FindExeRelativeToSetupExe( |
+ GetSetupExeFromRegistry(level, kSxSBrowserAppGuid), kChromeExe); |
#else |
- // There is no SxS build for Chromium. |
- return base::FilePath(); |
+ // There is no SxS build for Chromium. |
+ return base::FilePath(); |
#endif |
+ } else { |
+ return FindExeRelativeToSetupExe(GetSetupExeForInstallationLevel(level), |
+ kChromeExe); |
+ } |
} |
-} // namespace |
- |
-base::FilePath GetChromePathForInstallationLevel(InstallationLevel level) { |
- return FindExeRelativeToSetupExe( |
- GetSetupExeForInstallationLevel(level), kChromeExe); |
-} |
- |
-base::FilePath GetAnyChromePath() { |
- base::FilePath chrome_path; |
- if (chrome_path.empty()) |
- chrome_path = GetChromePathForInstallationLevel(SYSTEM_LEVEL_INSTALLATION); |
- if (chrome_path.empty()) |
- chrome_path = GetChromePathForInstallationLevel(USER_LEVEL_INSTALLATION); |
- return chrome_path; |
-} |
- |
-base::FilePath GetAnyChromeSxSPath() { |
- base::FilePath path = |
- GetChromeSxSPathForInstallationLevel(USER_LEVEL_INSTALLATION); |
+base::FilePath GetAnyChromePath(bool is_sxs) { |
+ base::FilePath path; |
+ path = GetChromePathForInstallationLevel(SYSTEM_LEVEL_INSTALLATION, is_sxs); |
if (path.empty()) |
- path = GetChromeSxSPathForInstallationLevel(SYSTEM_LEVEL_INSTALLATION); |
+ path = GetChromePathForInstallationLevel(USER_LEVEL_INSTALLATION, is_sxs); |
return path; |
} |