Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc

Issue 13428008: [Spellcheck] Record the number of words in the custom dictionary when the custom dictionary is load… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removing the todo, fixing grammar Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index 47315ad4c21e8ad277468a6efed423b18c6a4b77..206fc8d7cc6c8c08a5e13f8b64579e3bd49f7e37 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/spellcheck_messages.h"
#include "content/public/browser/browser_thread.h"
@@ -409,6 +410,7 @@ WordList SpellcheckCustomDictionary::LoadDictionaryFile(
LoadDictionaryFileReliably(words, path);
if (!words.empty() && VALID_CHANGE != SanitizeWordsToAdd(WordList(), words))
SaveDictionaryFileReliably(words, path);
+ SpellCheckHostMetrics::RecordCustomWordCountStats(words.size());
return words;
}
@@ -452,7 +454,6 @@ void SpellcheckCustomDictionary::OnLoaded(WordList custom_words) {
FOR_EACH_OBSERVER(Observer, observers_, OnCustomDictionaryLoaded());
}
-// TODO(rlp): record metrics on custom word size
void SpellcheckCustomDictionary::Apply(
const SpellcheckCustomDictionary::Change& dictionary_change) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

Powered by Google App Engine
This is Rietveld 408576698