diff options
author | gwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 18:23:38 +0000 |
---|---|---|
committer | gwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 18:23:38 +0000 |
commit | 3e31e7bdd8540ee06fe61a20e96b58de7f1bab8f (patch) | |
tree | 24fbe13f5b7ad463767596fc07b37f7aa6219c2c /chrome/installer | |
parent | 6098b711dbc9d38459796a0aea769f5677ada3e5 (diff) | |
download | chromium_src-3e31e7bdd8540ee06fe61a20e96b58de7f1bab8f.zip chromium_src-3e31e7bdd8540ee06fe61a20e96b58de7f1bab8f.tar.gz chromium_src-3e31e7bdd8540ee06fe61a20e96b58de7f1bab8f.tar.bz2 |
Modifies the behavior of setup.exe so when --system-level-toast is passed, it will call LaunchUserExperiment with "true" for system_install instead of "false".
R=huanr
BUG=none
TEST=Run setup.exe --system-level-toast with official build system-level install, toast should appear.
Review URL: http://codereview.chromium.org/586005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 5 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 13 |
2 files changed, 11 insertions, 7 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 69557e8..45642e4 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -489,7 +489,8 @@ bool HandleNonInstallCmdLineOptions(const CommandLine& cmd_line, // Launch the inactive user toast experiment. std::wstring flavor = cmd_line.GetSwitchValue(installer_util::switches::kInactiveUserToast); - dist->InactiveUserToastExperiment(StringToInt(flavor), system_install); + dist->InactiveUserToastExperiment(StringToInt(flavor), + cmd_line.HasSwitch(installer_util::switches::kSystemLevelToast)); return true; } else if (cmd_line.HasSwitch(installer_util::switches::kSystemLevelToast)) { // We started as system-level and have been re-launched as user level @@ -497,7 +498,7 @@ bool HandleNonInstallCmdLineOptions(const CommandLine& cmd_line, scoped_ptr<installer::Version> installed_version(InstallUtil::GetChromeVersion(system_install)); dist->LaunchUserExperiment(installer_util::REENTRY_SYS_UPDATE, - *installed_version, false); + *installed_version, true); return true; } return false; diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 157f3e1..5922382 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -119,13 +119,16 @@ int GetDirectoryWriteAgeInHours(const wchar_t* path) { return (now_time - dir_time); } -// Launches again this same process with a single switch --|flag|=|value|. +// Launches again this same process with switch --|flag|=|value|. +// If system_level_toast is true, appends --system-level-toast. // Does not wait for the process to terminate. -bool RelaunchSetup(const std::wstring& flag, int value, bool system_install) { +bool RelaunchSetup(const std::wstring& flag, int value, + bool system_level_toast) { CommandLine cmd_line(CommandLine::ForCurrentProcess()->GetProgram()); cmd_line.AppendSwitchWithValue(WideToASCII(flag), IntToWString(value)); - if (system_install) - cmd_line.AppendSwitch(WideToASCII(installer_util::switches::kSystemLevel)); + if (system_level_toast) + cmd_line.AppendSwitch( + WideToASCII(installer_util::switches::kSystemLevelToast)); return base::LaunchApp(cmd_line, false, false, NULL); } @@ -464,7 +467,7 @@ void GoogleChromeDistribution::UpdateDiffInstallStatus(bool system_install, // 1- Is a per-user-install and it updated: perform the experiment // 2- Is a system-install and it updated : relaunch as the interactive user // 3- It has been re-launched from the #2 case. In this case we enter -// this function with |system_install| false. +// this function with |system_install| true and a REENTRY_SYS_UPDATE status. void GoogleChromeDistribution::LaunchUserExperiment( installer_util::InstallStatus status, const installer::Version& version, bool system_install) { |