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

Unified Diff: chrome/installer/setup/install_worker.cc

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: chrome/installer/setup/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 2849aeae314bce95b4ea3ff148b33e13e38c5793..63b54bbe1dbf84d1f4a34dcf974c131f60824567 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -32,7 +32,9 @@
#include "base/win/windows_version.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/install_static/install_details.h"
#include "chrome/installer/setup/app_launcher_installer.h"
+#include "chrome/installer/setup/brand_constants.h"
#include "chrome/installer/setup/install.h"
#include "chrome/installer/setup/persistent_histogram_storage.h"
#include "chrome/installer/setup/setup_constants.h"
@@ -245,7 +247,7 @@ void AddProductSpecificWorkItems(const InstallationState& original_state,
current_version == nullptr, list);
#if defined(GOOGLE_CHROME_BUILD)
- if (!InstallUtil::IsChromeSxSProcess()) {
+ if (GetBrandConstants().supported_app_launcher) {
// Remove the app launcher key as it has been deprecated.
RemoveAppLauncherVersionKey(installer_state.root_key());
}
@@ -884,8 +886,8 @@ void AddMigrateUsageStatesWorkItems(const InstallationState& original_state,
if (installer_state.is_multi_install())
return;
- // This operation doesn't apply to SxS Chrome.
- if (InstallUtil::IsChromeSxSProcess())
+ // This operation doesn't apply to modes that don't support multi-install.
+ if (!install_static::InstallDetails::Get().supports_multi_install())
return;
// Ensure that Chrome is the product being installed or updated (there are no
@@ -1127,7 +1129,7 @@ void AddInstallWorkItems(const InstallationState& original_state,
#if defined(GOOGLE_CHROME_BUILD)
// For Chrome, unconditionally remove the legacy app_host.exe.
- if (!InstallUtil::IsChromeSxSProcess())
+ if (GetBrandConstants().supported_app_launcher)
AddRemoveLegacyAppHostExeWorkItems(target_path, temp_path, install_list);
#endif // GOOGLE_CHROME_BUILD
@@ -1163,10 +1165,10 @@ void AddInstallWorkItems(const InstallationState& original_state,
install_list);
}
- // Ensure that the Clients key for the binaries is gone for single installs
- // (but not for SxS Chrome).
- if (!installer_state.is_multi_install() &&
- !InstallUtil::IsChromeSxSProcess()) {
+ // Ensure that the Clients key for the binaries is gone for single installs of
+ // multi-capable products.
+ if (install_static::InstallDetails::Get().supports_multi_install() &&
+ !installer_state.is_multi_install()) {
BrowserDistribution* binaries_dist =
BrowserDistribution::GetSpecificDistribution(
BrowserDistribution::CHROME_BINARIES);
@@ -1176,7 +1178,7 @@ void AddInstallWorkItems(const InstallationState& original_state,
}
#if defined(GOOGLE_CHROME_BUILD)
- if (!InstallUtil::IsChromeSxSProcess())
+ if (GetBrandConstants().supported_app_launcher)
robertshield 2016/11/04 12:50:35 I don't have a suggestion, more of an observation:
grt (UTC plus 2) 2016/11/08 13:02:13 I wouldn't object to resolving it now somehow. Her
robertshield 2016/11/08 22:03:40 Thought about this for a bit and I'm not sure if t
grt (UTC plus 2) 2016/11/10 15:18:03 Now is as good a time as any. WDYT?
AddRemoveLegacyAppCommandsWorkItems(installer_state, install_list);
#endif // GOOGLE_CHROME_BUILD

Powered by Google App Engine
This is Rietveld 408576698