Index: chrome/installer/setup/setup_main.cc |
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc |
index 12fd98d907ef58013a7723727b809ffd55c2436a..7a4ccbfc89a304709cf3abff4d7a9df8ff916679 100644 |
--- a/chrome/installer/setup/setup_main.cc |
+++ b/chrome/installer/setup/setup_main.cc |
@@ -60,6 +60,7 @@ |
#include "chrome/installer/util/master_preferences_constants.h" |
#include "chrome/installer/util/self_cleaning_temp_dir.h" |
#include "chrome/installer/util/shell_util.h" |
+#include "chrome/installer/util/user_experiment.h" |
#include "chrome/installer/util/util_constants.h" |
#include "installer_util_strings.h" // NOLINT |
@@ -922,9 +923,14 @@ installer::InstallStatus InstallProductsHelper( |
} |
for (Products::const_iterator it = products.begin(); it < products.end(); |
++it) { |
+ using installer::user_experiment::UserExperiment; |
const Product& product = **it; |
- product.distribution()->LaunchUserExperiment(setup_path, |
- install_status, *installer_version, product, system_install); |
+ if (UserExperiment::IsExperimentSupported( |
+ product.distribution()->GetType(), |
+ UserExperiment::kExperimentAny)) { |
+ UserExperiment::LaunchUserExperiment(setup_path, |
+ install_status, *installer_version, product, system_install); |
+ } |
} |
} |
} |
@@ -1239,6 +1245,7 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state, |
const CommandLine& cmd_line, |
InstallerState* installer_state, |
int* exit_code) { |
+ using installer::user_experiment::UserExperiment; |
// TODO(gab): Add a local |status| variable which each block below sets; |
// only determine the |exit_code| from |status| at the end (this will allow |
// this method to validate that |
@@ -1429,9 +1436,12 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state, |
++it) { |
const Product& product = **it; |
BrowserDistribution* browser_dist = product.distribution(); |
- browser_dist->InactiveUserToastExperiment( |
- flavor, ASCIIToUTF16(experiment_group), product, |
- installer_state->target_path()); |
+ if (UserExperiment::IsExperimentSupported(browser_dist->GetType(), |
+ UserExperiment::kExperimentInactiveUserToast)) { |
+ UserExperiment::InactiveUserToastExperiment( |
+ browser_dist, flavor, ASCIIToUTF16(experiment_group), product, |
+ installer_state->target_path()); |
+ } |
} |
} |
} else if (cmd_line.HasSwitch(installer::switches::kSystemLevelToast)) { |
@@ -1449,9 +1459,11 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state, |
<< browser_dist->GetAppShortCutName() |
<< " found for system-level toast."; |
} else { |
- browser_dist->LaunchUserExperiment(cmd_line.GetProgram(), |
- installer::REENTRY_SYS_UPDATE, |
- installed_version, product, true); |
+ if (UserExperiment::IsExperimentSupported(browser_dist->GetType(), |
+ UserExperiment::kExperimentAny)) { |
+ UserExperiment::LaunchUserExperiment(cmd_line.GetProgram(), |
+ installer::REENTRY_SYS_UPDATE, installed_version, product, true); |
+ } |
} |
} |
} else if (cmd_line.HasSwitch( |