summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 10:52:40 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 10:52:40 +0000
commit1dd8cc3c49db74aa5542a6e180cdeeeb895befca (patch)
treed72f32d2fc8d45e48fdd287578c6df1590d62679 /chrome/installer
parent3aada9f94a25f683a3d180e4213d0e2e35cba12f (diff)
downloadchromium_src-1dd8cc3c49db74aa5542a6e180cdeeeb895befca.zip
chromium_src-1dd8cc3c49db74aa5542a6e180cdeeeb895befca.tar.gz
chromium_src-1dd8cc3c49db74aa5542a6e180cdeeeb895befca.tar.bz2
Remove dead code.
TBR=cpu Review URL: https://chromiumcodereview.appspot.com/9969005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc50
1 files changed, 7 insertions, 43 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index e51e68f..118a283 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -279,40 +279,6 @@ bool LaunchSetupAsConsoleUser(const FilePath& setup_path,
return launched;
}
-// The plugin infobar experiment is just setting the client registry value
-// to one of four possible values from 10% of the elegible population, which
-// is defined as active users that have opted-in for sending stats.
-// Chrome reads this value and modifies the plugin blocking and infobar
-// behavior accordingly.
-bool DoInfobarPluginsExperiment(int dir_age_hours) {
- std::wstring client;
- if (!GoogleUpdateSettings::GetClient(&client))
- return false;
- // Make sure the user is not already in this experiment.
- if ((client.size() > 3) && (client[0] == L'P') && (client[1] == L'I'))
- return false;
- if (!GoogleUpdateSettings::GetCollectStatsConsent())
- return false;
- if (dir_age_hours > (24 * 14))
- return false;
- if (base::RandInt(0, 9)) {
- GoogleUpdateSettings::SetClient(
- attrition_experiments::kNotInPluginExperiment);
- return false;
- }
-
- const wchar_t* buckets[] = {
- attrition_experiments::kPluginNoBlockNoOOD,
- attrition_experiments::kPluginNoBlockDoOOD,
- attrition_experiments::kPluginDoBlockNoOOD,
- attrition_experiments::kPluginDoBlockDoOOD
- };
-
- size_t group = base::RandInt(0, arraysize(buckets)-1);
- GoogleUpdateSettings::SetClient(buckets[group]);
- VLOG(1) << "Plugin infobar experiment group: " << group;
- return true;
-}
} // namespace
GoogleChromeDistribution::GoogleChromeDistribution()
@@ -707,9 +673,9 @@ bool GoogleChromeDistribution::GetExperimentDetails(
return false;
}
-// Currently we have two experiments: 1) The inactive user toast. Which only
-// applies to users doing upgrades, and 2) The plugin infobar experiment
-// which only applies for active users.
+// Currently we only have one experiment: the inactive user toast. Which only
+// applies for users doing upgrades.
+
//
// There are three scenarios when this function is called:
// 1- Is a per-user-install and it updated: perform the experiment
@@ -758,16 +724,13 @@ void GoogleChromeDistribution::LaunchUserExperiment(
// chrome user data directory.
FilePath user_data_dir(product.GetUserDataPath());
- const bool toast_experiment_enabled = false;
+ const bool experiment_enabled = false;
const int kThirtyDays = 30 * 24;
int dir_age_hours = GetDirectoryWriteAgeInHours(
user_data_dir.value().c_str());
- if (!toast_experiment_enabled) {
- // Ok, no toast, but what about the plugin infobar experiment?
- if (!DoInfobarPluginsExperiment(dir_age_hours)) {
- VLOG(1) << "No infobar experiment";
- }
+ if (!experiment_enabled) {
+ VLOG(1) << "Toast experiment is disabled.";
return;
} else if (dir_age_hours < 0) {
// This means that we failed to find the user data dir. The most likely
@@ -776,6 +739,7 @@ void GoogleChromeDistribution::LaunchUserExperiment(
SetClient(base_group + kToastUDDirFailure, true);
return;
} else if (dir_age_hours < kThirtyDays) {
+ // An active user, so it does not qualify.
VLOG(1) << "Chrome used in last " << dir_age_hours << " hours";
SetClient(base_group + kToastActiveGroup, true);
return;