summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 04:00:15 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 04:00:15 +0000
commit29a9f6f729b6614f3886bd099a9fcb0aede71766 (patch)
treedaedda8a57cf1f92ca8598eafef7d8b68cbe0778
parent7d0284e0c4638201635bccec014a6a8f08e58131 (diff)
downloadchromium_src-29a9f6f729b6614f3886bd099a9fcb0aede71766.zip
chromium_src-29a9f6f729b6614f3886bd099a9fcb0aede71766.tar.gz
chromium_src-29a9f6f729b6614f3886bd099a9fcb0aede71766.tar.bz2
Check setup.exe called with --register-chrome-browser is running as admin
This switch requires that the installer is being run as administrator. This change adds a check to the installer to check this. BUG=83845 TEST=Installation and setting as the default browser should be checked on XP, Vista and Windows 7 with and without an admin account. No change in behavior should result from this change. Review URL: http://codereview.chromium.org/7346004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92313 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/installer/setup/setup_main.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index cbd6e33..ac57b66 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -914,6 +914,7 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state,
// ShellUtil::kPotentialProtocolAssociations.
// These options should only be used when setup.exe is launched with admin
// rights. We do not make any user specific changes with this option.
+ DCHECK(IsUserAnAdmin());
std::wstring chrome_exe(cmd_line.GetSwitchValueNative(
installer::switches::kRegisterChromeBrowser));
std::wstring suffix;