summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellcheck_host.cc
diff options
context:
space:
mode:
authormorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-16 02:56:58 +0000
committermorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-16 02:56:58 +0000
commit500263ec2bfa08c78d303eb3966b1971a0ce0617 (patch)
treeb3f7e71d33084b16365f08fd4e872c36f5a61b7a /chrome/browser/spellcheck_host.cc
parentf3ee2bc3d9d21813b6339f47662ad763ba1c567a (diff)
downloadchromium_src-500263ec2bfa08c78d303eb3966b1971a0ce0617.zip
chromium_src-500263ec2bfa08c78d303eb3966b1971a0ce0617.tar.gz
chromium_src-500263ec2bfa08c78d303eb3966b1971a0ce0617.tar.bz2
Added UMA histgrams for spellchecking.
Added items are: - SpellCheck.Enabled - SpellCheck.CustomWords - SpellCheck.MisspellRatio - SpellCheck.ShowSuggestion - SpellCheck.ReplaceRatio BUG=none TEST=none Review URL: http://codereview.chromium.org/6995041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellcheck_host.cc')
-rw-r--r--chrome/browser/spellcheck_host.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index aed3d9b..6517da3 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/spellcheck_host.h"
+#include "base/metrics/histogram.h"
#include "base/string_split.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/profiles/profile.h"
@@ -69,3 +70,18 @@ int SpellCheckHost::GetSpellCheckLanguages(
}
return -1;
}
+
+// static
+void SpellCheckHost::RecordCustomWordCountStats(size_t count) {
+ UMA_HISTOGRAM_COUNTS("SpellCheck.CustomWords", count);
+}
+
+// static
+void SpellCheckHost::RecordEnabledStats(bool enabled) {
+ UMA_HISTOGRAM_BOOLEAN("SpellCheck.Enabled", enabled);
+ // Because SpellCheckHost is instantiated lazily, the size of
+ // custom dictionary is unknown at this time. We mark it as -1 and
+ // record actual value later. See SpellCheckHost for more detail.
+ if (enabled)
+ RecordCustomWordCountStats(-1);
+}