summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 16:30:06 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 16:30:06 +0000
commit69fbc3692896a7f47d4bd42a2f6c611bfcfa8c8a (patch)
tree18e55e4b6c3db5253d9c62670f665ad7c8435433 /chrome/installer/setup
parent4e3c45580eebf8cf5a99eb0d5f999f455a7f8b5d (diff)
downloadchromium_src-69fbc3692896a7f47d4bd42a2f6c611bfcfa8c8a.zip
chromium_src-69fbc3692896a7f47d4bd42a2f6c611bfcfa8c8a.tar.gz
chromium_src-69fbc3692896a7f47d4bd42a2f6c611bfcfa8c8a.tar.bz2
Fix toast experiments, which had regressed.
BUG=76400 TEST=Try out the toast experiment, both at user- and system-level. Review URL: http://codereview.chromium.org/6670087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r--chrome/installer/setup/setup_main.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 0f0090d..f773614 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -644,10 +644,19 @@ installer::InstallStatus InstallProductsHelper(
//
// There is another way to reach this same function if this is a system
// level install. See HandleNonInstallCmdLineOptions().
- for (size_t i = 0; i < products.size(); ++i) {
- const Product* product = products[i];
- product->distribution()->LaunchUserExperiment(install_status,
- *installer_version, *product, system_install);
+ {
+ // If installation failed, use the path to the currently running setup.
+ // If installation succeeded, use the path to setup in the installer dir.
+ FilePath setup_path(cmd_line.GetProgram());
+ if (InstallUtil::GetInstallReturnCode(install_status) == 0) {
+ setup_path = installer_state.GetInstallerDirectory(*installer_version)
+ .Append(setup_path.BaseName());
+ }
+ for (size_t i = 0; i < products.size(); ++i) {
+ const Product* product = products[i];
+ product->distribution()->LaunchUserExperiment(setup_path,
+ install_status, *installer_version, *product, system_install);
+ }
}
}
@@ -895,7 +904,8 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state,
scoped_ptr<Version> installed_version(
InstallUtil::GetChromeVersion(browser_dist,
installer_state->system_install()));
- browser_dist->LaunchUserExperiment(installer::REENTRY_SYS_UPDATE,
+ browser_dist->LaunchUserExperiment(cmd_line.GetProgram(),
+ installer::REENTRY_SYS_UPDATE,
*installed_version, *product, true);
}
} else if (cmd_line.HasSwitch(