Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3952)

Unified Diff: chrome/installer/setup/setup_main.cc

Issue 12321061: Pulling user experiment code from BrowserDistribution to a new class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Stylistic changes; eliminating UserExperiment class in favour of namespace. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ea50273c95e4c3c9038f1fbfdf15d932c10842b3 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
@@ -923,8 +924,9 @@ installer::InstallStatus InstallProductsHelper(
for (Products::const_iterator it = products.begin(); it < products.end();
++it) {
const Product& product = **it;
- product.distribution()->LaunchUserExperiment(setup_path,
- install_status, *installer_version, product, system_install);
+ installer::user_experiment::LaunchUserExperiment(
+ product.distribution(), setup_path, install_status,
+ *installer_version, product, system_install);
}
}
}
@@ -1429,8 +1431,8 @@ 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::user_experiment::InactiveUserToastExperiment(
+ browser_dist, flavor, ASCIIToUTF16(experiment_group), product,
installer_state->target_path());
}
}
@@ -1449,9 +1451,9 @@ 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);
+ installer::user_experiment::LaunchUserExperiment(
+ browser_dist, cmd_line.GetProgram(), installer::REENTRY_SYS_UPDATE,
+ installed_version, product, true);
}
}
} else if (cmd_line.HasSwitch(

Powered by Google App Engine
This is Rietveld 408576698