summaryrefslogtreecommitdiffstats
path: root/chrome/browser/instant/instant_controller.cc
diff options
context:
space:
mode:
authorsreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-31 00:50:13 +0000
committersreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-31 00:50:13 +0000
commitddb3be78a6c1a9e744e4fc5b0a179bab71b37fb3 (patch)
tree48619ad9082a2fdef5a687ce59a3f0fd35a88697 /chrome/browser/instant/instant_controller.cc
parentd1872510434fcd98842de4dbc3332dad17ebc5ff (diff)
downloadchromium_src-ddb3be78a6c1a9e744e4fc5b0a179bab71b37fb3.zip
chromium_src-ddb3be78a6c1a9e744e4fc5b0a179bab71b37fb3.tar.gz
chromium_src-ddb3be78a6c1a9e744e4fc5b0a179bab71b37fb3.tar.bz2
Add more histograms to track Instant and Field Trial state.
+ Makes the "OptOut" histogram more useful, by also counting enables (previously, we just had the raw number of opt-outs, with no information about the denominator, and thus, the rate of opt-outs). + Adds a histogram to track the various reasons for assigning a field trial group. This is motivated by @mpearson's analysis that shows large discrepancies between what we expect and what we actually see in the current histogram data. BUG=none TEST=none Review URL: http://codereview.chromium.org/9958031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant/instant_controller.cc')
-rw-r--r--chrome/browser/instant/instant_controller.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 0d31d4a..b1d6e3f 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -113,6 +113,11 @@ void InstantController::Enable(Profile* profile) {
if (!service)
return;
+ base::Histogram* histogram = base::LinearHistogram::FactoryGet(
+ "Instant.Preference" + InstantFieldTrial::GetGroupName(profile), 1, 2, 3,
+ base::Histogram::kUmaTargetedHistogramFlag);
+ histogram->Add(1);
+
service->SetBoolean(prefs::kInstantEnabledOnce, true);
service->SetBoolean(prefs::kInstantEnabled, true);
service->SetBoolean(prefs::kInstantConfirmDialogShown, true);
@@ -135,10 +140,10 @@ void InstantController::Disable(Profile* profile) {
delta.InMinutes(), 1, 60 * 24 * 10, 50);
}
- base::Histogram* histogram = base::Histogram::FactoryGet(
- "Instant.OptOut" + InstantFieldTrial::GetGroupName(profile), 1, 1000000,
- 50, base::Histogram::kUmaTargetedHistogramFlag);
- histogram->Add(1);
+ base::Histogram* histogram = base::LinearHistogram::FactoryGet(
+ "Instant.Preference" + InstantFieldTrial::GetGroupName(profile), 1, 2, 3,
+ base::Histogram::kUmaTargetedHistogramFlag);
+ histogram->Add(0);
service->SetBoolean(prefs::kInstantEnabledOnce, true);
service->SetBoolean(prefs::kInstantEnabled, false);