summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 20:08:58 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 20:08:58 +0000
commit30b3a57d256d39847a3ed75c813bd75688f3fd24 (patch)
tree9a5b107ba4b0b99d29e96e48052207137d401be1 /chrome/installer
parent167b5f97efe2e9fc2eda0edc04f9a51dd5fc359e (diff)
downloadchromium_src-30b3a57d256d39847a3ed75c813bd75688f3fd24.zip
chromium_src-30b3a57d256d39847a3ed75c813bd75688f3fd24.tar.gz
chromium_src-30b3a57d256d39847a3ed75c813bd75688f3fd24.tar.bz2
Add product-specific flags to the rename command in the registry. This fixes a regression that prevented in-place upgrades of Chrome Frame from working.
BUG=73329 TEST=Follow the steps in the bug. Between steps 4 and 5, check that the "cmd" registry value in HKLM\Software\Google\Update\Clients\{8BA986DA-5100-405E-AA35-86F34A02ACBF} contains "--chrome-frame". Review URL: http://codereview.chromium.org/6541029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/setup/install_worker.cc15
-rw-r--r--chrome/installer/util/installation_validator.cc13
-rw-r--r--chrome/installer/util/installation_validator.h6
3 files changed, 18 insertions, 16 deletions
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 0717a34..aaa8112 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -430,15 +430,12 @@ bool AppendPostInstallTasks(const InstallerState& installer_state,
.Append(setup_path.BaseName()));
CommandLine rename(installer_path);
- rename.AppendSwitch(installer::switches::kRenameChromeExe);
+ rename.AppendSwitch(switches::kRenameChromeExe);
if (installer_state.system_install())
- rename.AppendSwitch(installer::switches::kSystemLevel);
+ rename.AppendSwitch(switches::kSystemLevel);
- if (InstallUtil::IsChromeSxSProcess())
- rename.AppendSwitch(installer::switches::kChromeSxS);
-
- if (installer_state.is_multi_install())
- rename.AppendSwitch(installer::switches::kMultiInstall);
+ if (installer_state.verbose_logging())
+ rename.AppendSwitch(switches::kVerboseLogging);
std::wstring version_key;
for (size_t i = 0; i < products.size(); ++i) {
@@ -456,11 +453,13 @@ bool AppendPostInstallTasks(const InstallerState& installer_state,
// will check the key and run the command, so we add it for all.
// After the first run, the subsequent runs should just be noops.
// (see Upgrade::SwapNewChromeExeIfPresent).
+ CommandLine product_rename_cmd(rename);
+ products[i]->AppendProductFlags(&product_rename_cmd);
in_use_update_work_items->AddSetRegValueWorkItem(
root,
version_key,
google_update::kRegRenameCmdField,
- rename.command_line_string(),
+ product_rename_cmd.command_line_string(),
true);
}
diff --git a/chrome/installer/util/installation_validator.cc b/chrome/installer/util/installation_validator.cc
index 1f76d61..0f62eda 100644
--- a/chrome/installer/util/installation_validator.cc
+++ b/chrome/installer/util/installation_validator.cc
@@ -21,7 +21,7 @@ BrowserDistribution::Type
return BrowserDistribution::CHROME_BROWSER;
}
-void InstallationValidator::ChromeRules::AddUninstallSwitchExpectations(
+void InstallationValidator::ChromeRules::AddProductSwitchExpectations(
const InstallationState& machine_state,
bool system_install,
const ProductState& product_state,
@@ -50,7 +50,7 @@ BrowserDistribution::Type
return BrowserDistribution::CHROME_FRAME;
}
-void InstallationValidator::ChromeFrameRules::AddUninstallSwitchExpectations(
+void InstallationValidator::ChromeFrameRules::AddProductSwitchExpectations(
const InstallationState& machine_state,
bool system_install,
const ProductState& product_state,
@@ -228,9 +228,9 @@ void InstallationValidator::ValidateUninstallCommand(const ProductContext& ctx,
ctx.system_install));
expected.push_back(std::make_pair(std::string(switches::kMultiInstall),
is_multi_install));
- ctx.rules.AddUninstallSwitchExpectations(ctx.machine_state,
- ctx.system_install,
- ctx.state, &expected);
+ ctx.rules.AddProductSwitchExpectations(ctx.machine_state,
+ ctx.system_install,
+ ctx.state, &expected);
ValidateCommandExpectations(ctx, command, expected, source, is_valid);
}
@@ -253,6 +253,9 @@ void InstallationValidator::ValidateRenameCommand(const ProductContext& ctx,
ctx.system_install));
expected.push_back(std::make_pair(std::string(switches::kMultiInstall),
ctx.state.is_multi_install()));
+ ctx.rules.AddProductSwitchExpectations(ctx.machine_state,
+ ctx.system_install,
+ ctx.state, &expected);
ValidateCommandExpectations(ctx, command, expected, "in-use renamer",
is_valid);
diff --git a/chrome/installer/util/installation_validator.h b/chrome/installer/util/installation_validator.h
index 101a249..710faf6 100644
--- a/chrome/installer/util/installation_validator.h
+++ b/chrome/installer/util/installation_validator.h
@@ -83,7 +83,7 @@ class InstallationValidator {
public:
virtual ~ProductRules() { }
virtual BrowserDistribution::Type distribution_type() const = 0;
- virtual void AddUninstallSwitchExpectations(
+ virtual void AddProductSwitchExpectations(
const InstallationState& machine_state,
bool system_install,
const ProductState& product_state,
@@ -94,7 +94,7 @@ class InstallationValidator {
class ChromeRules : public ProductRules {
public:
virtual BrowserDistribution::Type distribution_type() const OVERRIDE;
- virtual void AddUninstallSwitchExpectations(
+ virtual void AddProductSwitchExpectations(
const InstallationState& machine_state,
bool system_install,
const ProductState& product_state,
@@ -105,7 +105,7 @@ class InstallationValidator {
class ChromeFrameRules : public ProductRules {
public:
virtual BrowserDistribution::Type distribution_type() const OVERRIDE;
- virtual void AddUninstallSwitchExpectations(
+ virtual void AddProductSwitchExpectations(
const InstallationState& machine_state,
bool system_install,
const ProductState& product_state,