diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 05:21:10 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 05:21:10 +0000 |
commit | c3ad1b2b18db3b888439e81b22803a98f9fac6a6 (patch) | |
tree | 7e2741eb7940fe7a2f20c81b5f9d0f6adcd74535 /chrome/installer/setup | |
parent | 8523c3503496841cb9d3d6ca464496e164e49a0d (diff) | |
download | chromium_src-c3ad1b2b18db3b888439e81b22803a98f9fac6a6.zip chromium_src-c3ad1b2b18db3b888439e81b22803a98f9fac6a6.tar.gz chromium_src-c3ad1b2b18db3b888439e81b22803a98f9fac6a6.tar.bz2 |
Modify the toast to hit system-level installs
This is somewhat tricky. setup.exe is executed by SYSTEM and
as such we cannot run the experiment. So what we do is that
if there is an interactive user logged in at the moment of
chrome upgrade we re-launch setup in her context, from then
on things proceed as in the previous case.
Other enhancements
- New experiment codes TKxx and TLxx (99% and 1% as usual)
- New experiment group TK40 and TL40 : An active user
BUG=32474
TEST=see bug
Review URL: http://codereview.chromium.org/557077
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 59589b6..8b3e009 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -321,7 +321,10 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line, // There might be an experiment (for upgrade usually) that needs to happen. // An experiment's outcome can include chrome's uninstallation. If that is // the case we would not do that directly at this point but in another - // instance of setup.exe + // instance of setup.exe + // + // There is another way to reach this same function if this is a system + // level install. See HandleNonInstallCmdLineOptions(). dist->LaunchUserExperiment(install_status, *installer_version, system_level); } @@ -488,6 +491,14 @@ bool HandleNonInstallCmdLineOptions(const CommandLine& cmd_line, cmd_line.GetSwitchValue(installer_util::switches::kInactiveUserToast); dist->InactiveUserToastExperiment(StringToInt(flavor)); return true; + } else if (cmd_line.HasSwitch(installer_util::switches::kSystemLevelToast)) { + // We started as system-level and have been re-launched as user level + // to continue with the toast experiment. + scoped_ptr<installer::Version> + installed_version(InstallUtil::GetChromeVersion(system_install)); + dist->LaunchUserExperiment(installer_util::REENTRY_SYS_UPDATE, + *installed_version, false); + return true; } return false; } |