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

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

Issue 6469069: Merge 75412 - Add product-specific flags to the rename command in the registr... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/648/src/
Patch Set: '' Created 9 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker.cc
===================================================================
--- chrome/installer/setup/install_worker.cc (revision 75486)
+++ chrome/installer/setup/install_worker.cc (working copy)
@@ -433,16 +433,18 @@
.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);
+ rename.AppendSwitch(switches::kSystemLevel);
- if (InstallUtil::IsChromeSxSProcess())
- rename.AppendSwitch(installer::switches::kChromeSxS);
-
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) {
BrowserDistribution* dist = products[i]->distribution();
@@ -459,11 +461,19 @@
// 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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698