diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 21:02:13 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 21:02:13 +0000 |
commit | 4b7dae01cf23fc5ea48db253bff2225a00d40b5d (patch) | |
tree | d1c2301d3c1ab010737716102bee8b49acac678a | |
parent | 200f1ddcfc83ccabcf923530ee4ae65dab97de3c (diff) | |
download | chromium_src-4b7dae01cf23fc5ea48db253bff2225a00d40b5d.zip chromium_src-4b7dae01cf23fc5ea48db253bff2225a00d40b5d.tar.gz chromium_src-4b7dae01cf23fc5ea48db253bff2225a00d40b5d.tar.bz2 |
Merge 84660 - Add uma stats for touchpad
BUG=chromium-os:14220
TEST=None
Review URL: http://codereview.chromium.org/6871042
TBR=davemoore@chromium.org
Review URL: http://codereview.chromium.org/6982008
git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@84846 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/preferences.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc index 5dbb173..0f122fa 100644 --- a/chrome/browser/chromeos/preferences.cc +++ b/chrome/browser/chromeos/preferences.cc @@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/preferences.h" #include "base/i18n/time_formatting.h" +#include "base/metrics/histogram.h" #include "base/string_split.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -204,7 +205,7 @@ void Preferences::Init(PrefService* prefs) { enable_screen_lock_.Init(prefs::kEnableScreenLock, prefs, this); - // Initialize touchpad settings to what's saved in user preferences. + // Initialize preferences to currently saved state. NotifyPrefChanged(NULL); // If a guest is logged in, initialize the prefs as if this is the first @@ -223,12 +224,23 @@ void Preferences::Observe(NotificationType type, void Preferences::NotifyPrefChanged(const std::string* pref_name) { if (!pref_name || *pref_name == prefs::kTapToClickEnabled) { - CrosLibrary::Get()->GetTouchpadLibrary()->SetTapToClick( - tap_to_click_enabled_.GetValue()); + bool enabled = tap_to_click_enabled_.GetValue(); + CrosLibrary::Get()->GetTouchpadLibrary()->SetTapToClick(enabled); + if (pref_name) + UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Changed", enabled); + else + UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Started", enabled); } if (!pref_name || *pref_name == prefs::kTouchpadSensitivity) { - CrosLibrary::Get()->GetTouchpadLibrary()->SetSensitivity( - sensitivity_.GetValue()); + int sensitivity = sensitivity_.GetValue(); + CrosLibrary::Get()->GetTouchpadLibrary()->SetSensitivity(sensitivity); + if (pref_name) { + UMA_HISTOGRAM_CUSTOM_COUNTS( + "Touchpad.Sensitivity.Changed", sensitivity, 1, 5, 5); + } else { + UMA_HISTOGRAM_CUSTOM_COUNTS( + "Touchpad.Sensitivity.Started", sensitivity, 1, 5, 5); + } } // We don't handle prefs::kLanguageCurrentInputMethod and PreviousInputMethod |