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

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

Issue 164408: Merge 21428 - Allow two user level installs of Chrome to have default browser... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/uninstall.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/setup_main.cc
===================================================================
--- chrome/installer/setup/setup_main.cc (revision 23187)
+++ chrome/installer/setup/setup_main.cc (working copy)
@@ -550,7 +550,13 @@
// make any user specific changes in this option.
std::wstring chrome_exe(cmd_line.GetSwitchValue(
installer_util::switches::kRegisterChromeBrowser));
- exit_code = ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true);
+ std::wstring suffix;
+ if (cmd_line.HasSwitch(
+ installer_util::switches::kRegisterChromeBrowserSuffix)) {
+ suffix = cmd_line.GetSwitchValue(
+ installer_util::switches::kRegisterChromeBrowserSuffix);
+ }
+ exit_code = ShellUtil::RegisterChromeBrowser(chrome_exe, suffix, false);
return true;
} else if (cmd_line.HasSwitch(installer_util::switches::kRenameChromeExe)) {
// If --rename-chrome-exe is specified, we want to rename the executables
@@ -559,8 +565,19 @@
return true;
} else if (cmd_line.HasSwitch(
installer_util::switches::kRemoveChromeRegistration)) {
+ // This is almost reverse of --register-chrome-browser option above.
+ // Here we delete Chrome browser registration. This option should only
+ // be used when setup.exe is launched with admin rights. We do not
+ // make any user specific changes in this option.
+ std::wstring suffix;
+ if (cmd_line.HasSwitch(
+ installer_util::switches::kRegisterChromeBrowserSuffix)) {
+ suffix = cmd_line.GetSwitchValue(
+ installer_util::switches::kRegisterChromeBrowserSuffix);
+ }
installer_util::InstallStatus tmp = installer_util::UNKNOWN_STATUS;
- installer_setup::DeleteChromeRegistrationKeys(HKEY_LOCAL_MACHINE, tmp);
+ installer_setup::DeleteChromeRegistrationKeys(HKEY_LOCAL_MACHINE,
+ suffix, tmp);
exit_code = tmp;
return true;
} else if (cmd_line.HasSwitch(installer_util::switches::kInactiveUserToast)) {
Property changes on: chrome\installer\setup\setup_main.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/installer/setup/setup_main.cc:r21428
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/uninstall.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698