Commit c38084e1 authored by grt's avatar grt Committed by Commit bot

Remove multi-install from installer_util.

This cleanup CL:
- Removes InstallUtil::IsMultiInstall.
- Removes MasterPreferences::is_multi_install.
- Removes various multi-related constants.

BUG=577816

Review-Url: https://codereview.chromium.org/2594113002
Cr-Commit-Position: refs/heads/master@{#442894}
parent db40eabe
...@@ -319,11 +319,6 @@ void InstallUtil::ResetIsPerUserInstallForTest() { ...@@ -319,11 +319,6 @@ void InstallUtil::ResetIsPerUserInstallForTest() {
env->UnSetVar(kEnvProgramFilesPath); env->UnSetVar(kEnvProgramFilesPath);
} }
bool InstallUtil::IsMultiInstall(bool system_install) {
ProductState state;
return state.Initialize(system_install) && state.is_multi_install();
}
bool CheckIsChromeSxSProcess() { bool CheckIsChromeSxSProcess() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
CHECK(command_line); CHECK(command_line);
......
...@@ -92,9 +92,6 @@ class InstallUtil { ...@@ -92,9 +92,6 @@ class InstallUtil {
// with fresh data. // with fresh data.
static void ResetIsPerUserInstallForTest(); static void ResetIsPerUserInstallForTest();
// Returns true if Chrome at |system_level| is a multi install.
static bool IsMultiInstall(bool system_install);
// Returns true if this is running setup process for Chrome SxS (as // Returns true if this is running setup process for Chrome SxS (as
// indicated by the presence of --chrome-sxs on the command line) or if this // indicated by the presence of --chrome-sxs on the command line) or if this
// is running Chrome process from the Chrome SxS installation (as indicated // is running Chrome process from the Chrome SxS installation (as indicated
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h" #include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/install_util.h" #include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/util_constants.h"
namespace installer { namespace installer {
...@@ -117,7 +118,7 @@ bool ProductState::Initialize(bool system_install) { ...@@ -117,7 +118,7 @@ bool ProductState::Initialize(bool system_install) {
&dw_value) == ERROR_SUCCESS) && (dw_value != 0); &dw_value) == ERROR_SUCCESS) && (dw_value != 0);
// Multi-install is a legacy option that is read for the sole purpose of // Multi-install is a legacy option that is read for the sole purpose of
// migrating clients away from it. // migrating clients away from it.
multi_install_ = uninstall_command_.HasSwitch(switches::kMultiInstall); multi_install_ = uninstall_command_.HasSwitch("multi-install");
} }
// Read from the ClientStateMedium key. Values here override those in // Read from the ClientStateMedium key. Values here override those in
......
...@@ -163,12 +163,10 @@ void MasterPreferences::InitializeFromCommandLine( ...@@ -163,12 +163,10 @@ void MasterPreferences::InitializeFromCommandLine(
} }
// Strip multi-install from the dictionary, if present. This ensures that any // Strip multi-install from the dictionary, if present. This ensures that any
// code that probes the dictionary directly to check for multi-install (rather // code that probes the dictionary directly to check for multi-install
// than calling is_multi_install()) receives false. The updated dictionary is // receives false. The updated dictionary is not written back to disk.
// not written back to disk. master_dictionary_->Remove(
master_dictionary_->Remove(std::string(master_preferences::kDistroDict) + std::string(master_preferences::kDistroDict) + ".multi_install", nullptr);
'.' + master_preferences::kMultiInstall,
nullptr);
// Cache a pointer to the distribution dictionary. Ignore errors if any. // Cache a pointer to the distribution dictionary. Ignore errors if any.
master_dictionary_->GetDictionary(installer::master_preferences::kDistroDict, master_dictionary_->GetDictionary(installer::master_preferences::kDistroDict,
......
...@@ -170,8 +170,6 @@ class MasterPreferences { ...@@ -170,8 +170,6 @@ class MasterPreferences {
return preferences_read_from_file_; return preferences_read_from_file_;
} }
bool is_multi_install() const { return false; }
// Returns a reference to this MasterPreferences' root dictionary of values. // Returns a reference to this MasterPreferences' root dictionary of values.
const base::DictionaryValue& master_dictionary() const { const base::DictionaryValue& master_dictionary() const {
return *master_dictionary_.get(); return *master_dictionary_.get();
......
...@@ -36,7 +36,6 @@ namespace master_preferences { ...@@ -36,7 +36,6 @@ namespace master_preferences {
"suppress_first_run_default_browser_prompt"; "suppress_first_run_default_browser_prompt";
const char kMsi[] = "msi"; const char kMsi[] = "msi";
const char kMsiProductId[] = "msi_product_id"; const char kMsiProductId[] = "msi_product_id";
const char kMultiInstall[] = "multi_install";
const char kRequireEula[] = "require_eula"; const char kRequireEula[] = "require_eula";
const char kSystemLevel[] = "system_level"; const char kSystemLevel[] = "system_level";
const char kVerboseLogging[] = "verbose_logging"; const char kVerboseLogging[] = "verbose_logging";
......
...@@ -75,8 +75,6 @@ extern const char kMsi[]; ...@@ -75,8 +75,6 @@ extern const char kMsi[];
// String. The MSI Product ID under which the MSI stores its information. This // String. The MSI Product ID under which the MSI stores its information. This
// is used to update the DisplayVersion to match Chrome's version number. // is used to update the DisplayVersion to match Chrome's version number.
extern const char kMsiProductId[]; extern const char kMsiProductId[];
// Boolean. Support installing multiple products at once.
extern const char kMultiInstall[];
// Boolean. Show EULA dialog before install. // Boolean. Show EULA dialog before install.
extern const char kRequireEula[]; extern const char kRequireEula[];
// Boolean. Indicates that the first-run 'set-as-default' dialog should not be // Boolean. Indicates that the first-run 'set-as-default' dialog should not be
......
...@@ -321,23 +321,6 @@ TEST_F(MasterPreferencesTest, TestDefaultInstallConfig) { ...@@ -321,23 +321,6 @@ TEST_F(MasterPreferencesTest, TestDefaultInstallConfig) {
base::CommandLine::FromString(chrome_cmd.str())); base::CommandLine::FromString(chrome_cmd.str()));
installer::MasterPreferences pref_chrome(chrome_install); installer::MasterPreferences pref_chrome(chrome_install);
EXPECT_FALSE(pref_chrome.is_multi_install());
}
TEST_F(MasterPreferencesTest, TestMultiInstallIgnoredConfig) {
using installer::switches::kMultiInstall;
using installer::switches::kChrome;
std::wstringstream chrome_cmd, cf_cmd, chrome_cf_cmd;
chrome_cmd << "setup.exe --" << kMultiInstall << " --" << kChrome;
base::CommandLine chrome_install(
base::CommandLine::FromString(chrome_cmd.str()));
installer::MasterPreferences pref_chrome(chrome_install);
EXPECT_FALSE(pref_chrome.is_multi_install());
} }
TEST_F(MasterPreferencesTest, EnforceLegacyCreateAllShortcutsFalse) { TEST_F(MasterPreferencesTest, EnforceLegacyCreateAllShortcutsFalse) {
......
...@@ -8,10 +8,6 @@ namespace installer { ...@@ -8,10 +8,6 @@ namespace installer {
namespace switches { namespace switches {
// Install Chrome.
// Currently this is only required when used in combination with kMultiInstall.
const char kChrome[] = "chrome";
// Run the installer for Chrome SxS. // Run the installer for Chrome SxS.
const char kChromeSxS[] = "chrome-sxs"; const char kChromeSxS[] = "chrome-sxs";
...@@ -83,10 +79,6 @@ const char kMakeChromeDefault[] = "make-chrome-default"; ...@@ -83,10 +79,6 @@ const char kMakeChromeDefault[] = "make-chrome-default";
// Tells installer to expect to be run as a subsidiary to an MSI. // Tells installer to expect to be run as a subsidiary to an MSI.
const char kMsi[] = "msi"; const char kMsi[] = "msi";
// Tells installer to install multiple products specified on the command line.
// (e.g. Chrome Frame, Chrome)
const char kMultiInstall[] = "multi-install";
// Useful only when used with --update-setup-exe, otherwise ignored. It // Useful only when used with --update-setup-exe, otherwise ignored. It
// specifies the full path where updated setup.exe will be stored. // specifies the full path where updated setup.exe will be stored.
const char kNewSetupExe[] = "new-setup-exe"; const char kNewSetupExe[] = "new-setup-exe";
......
...@@ -144,7 +144,6 @@ enum InstallerStage { ...@@ -144,7 +144,6 @@ enum InstallerStage {
namespace switches { namespace switches {
extern const char kChrome[];
extern const char kChromeSxS[]; extern const char kChromeSxS[];
extern const char kConfigureUserSettings[]; extern const char kConfigureUserSettings[];
extern const char kCriticalUpdateVersion[]; extern const char kCriticalUpdateVersion[];
...@@ -162,7 +161,6 @@ extern const char kInstallerData[]; ...@@ -162,7 +161,6 @@ extern const char kInstallerData[];
extern const char kLogFile[]; extern const char kLogFile[];
extern const char kMakeChromeDefault[]; extern const char kMakeChromeDefault[];
extern const char kMsi[]; extern const char kMsi[];
extern const char kMultiInstall[];
extern const char kNewSetupExe[]; extern const char kNewSetupExe[];
extern const char kOnOsUpgrade[]; extern const char kOnOsUpgrade[];
extern const char kPreviousVersion[]; extern const char kPreviousVersion[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment