diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 19:50:22 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 19:50:22 +0000 |
commit | 632886beaba211f9d9a19f2f1773d50f7ed2e247 (patch) | |
tree | 80a3f053c3eef477a26bf06d4eb91b4b49bcfcd8 /chrome | |
parent | 129d72c1c208c73406212fc2a61d96d1a75c0d03 (diff) | |
download | chromium_src-632886beaba211f9d9a19f2f1773d50f7ed2e247.zip chromium_src-632886beaba211f9d9a19f2f1773d50f7ed2e247.tar.gz chromium_src-632886beaba211f9d9a19f2f1773d50f7ed2e247.tar.bz2 |
Merge 75412 - 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
TBR=grt@chromium.org
Review URL: http://codereview.chromium.org/6469069
git-svn-id: svn://svn.chromium.org/chrome/branches/648/src@75502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/installer/setup/install_worker.cc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc index 0e45155..cb03bad 100644 --- a/chrome/installer/setup/install_worker.cc +++ b/chrome/installer/setup/install_worker.cc @@ -433,15 +433,17 @@ bool AppendPostInstallTasks(bool multi_install, .Append(setup_path.BaseName())); CommandLine rename(installer_path); - rename.AppendSwitch(installer::switches::kRenameChromeExe); + rename.AppendSwitch(switches::kRenameChromeExe); if (package.system_level()) - rename.AppendSwitch(installer::switches::kSystemLevel); - - if (InstallUtil::IsChromeSxSProcess()) - rename.AppendSwitch(installer::switches::kChromeSxS); + rename.AppendSwitch(switches::kSystemLevel); if (multi_install) - rename.AppendSwitch(installer::switches::kMultiInstall); + rename.AppendSwitch(switches::kMultiInstall); + + const MasterPreferences& prefs = MasterPreferences::ForCurrentProcess(); + bool value = false; + if (prefs.GetBool(master_preferences::kVerboseLogging, &value) && value) + rename.AppendSwitch(switches::kVerboseLogging); std::wstring version_key; for (size_t i = 0; i < products.size(); ++i) { @@ -459,11 +461,19 @@ bool AppendPostInstallTasks(bool multi_install, // 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). + // We use the same mechanism used for the uninstall command, whereby we + // delegate to the BrowserDistribution class to add product-specific + // switches to the command line. A better name for this method would be + // AppendProductSpecificCommandLineFlags, or something like that. In the + // interest of keeping this merge simple, we'll leave the name as-is. On + // trunk, things have been refactored so this isn't quite so misleading. + CommandLine product_rename_cmd(rename); + dist->AppendUninstallCommandLineFlags(&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); } |