diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 18:18:58 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 18:18:58 +0000 |
commit | 04476bdf8359df8f014a64043ace2b4e67241db2 (patch) | |
tree | 5da85316cc026327a122f7e88a2a4bb9991687ce /chrome/installer | |
parent | de9743ff70c7d381123617f6e2ac3658f42dce5a (diff) | |
download | chromium_src-04476bdf8359df8f014a64043ace2b4e67241db2.zip chromium_src-04476bdf8359df8f014a64043ace2b4e67241db2.tar.gz chromium_src-04476bdf8359df8f014a64043ace2b4e67241db2.tar.bz2 |
Toast experiment control group
- The analisis team needs a control group; these are users that qualify don't get the experiment.
- Select 50 % at random
BUG= b/1484308
TEST = see the bug
Review URL: http://codereview.chromium.org/147057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 735ae27..38474cc 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -440,8 +440,16 @@ void GoogleChromeDistribution::LaunchUserExperiment( int dir_age_hours = GetDirectoryWriteAgeInHours(user_data_dir.c_str()); if (dir_age_hours < kNinetyDays) return; + // At this point the user qualifies for the experiment, however we need to + // tag a control group, which is at random 50% of the population. + if (::GetTickCount() & 0x1) { + // We tag the user, but it wont participate in the experiment. + GoogleUpdateSettings::SetClient(kToastExpQualifyGroup); + LOG(INFO) << "User is toast experiment control group"; + return; + } } - LOG(INFO) << "User qualified for toast experiment"; + LOG(INFO) << "User drafted for toast experiment"; // The experiment needs to be performed in a different process because // google_update expects the upgrade process to be quick and nimble. RelaunchSetup(installer_util::switches::kInactiveUserToast); |