Commit 7426cc85 authored by Guillaume Jenkins's avatar Guillaume Jenkins Committed by Chromium LUCI CQ

[Spellcheck] Remove unused histograms

The Spellcheck.MisspellRatio and Spellcheck.ReplaceRatio histograms
haven't been in use for some time. The code path to send samples is not
being called. This CL marks them as obsolete and removes the
corresponding UMA macros.


Bug: 1165190
Change-Id: I7528d308506dc5011ba3f5958546112dd765ec69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628932Reviewed-by: default avatarCaitlin Fischer <caitlinfischer@google.com>
Commit-Queue: Guillaume Jenkins <gujen@google.com>
Cr-Commit-Position: refs/heads/master@{#844102}
parent b36b4f17
......@@ -479,17 +479,6 @@ IN_PROC_BROWSER_TEST_F(SpellcheckServiceHostBrowserTest, RequestDictionary) {
EXPECT_TRUE(GetEnableSpellcheckState());
}
// When the renderer notifies that it corrected a word, the render process
// host should record UMA stats about the correction.
IN_PROC_BROWSER_TEST_F(SpellcheckServiceHostBrowserTest, NotifyChecked) {
const char kMisspellRatio[] = "SpellCheck.MisspellRatio";
base::HistogramTester tester;
tester.ExpectTotalCount(kMisspellRatio, 0);
NotifyChecked();
tester.ExpectTotalCount(kMisspellRatio, 1);
}
#if BUILDFLAG(USE_RENDERER_SPELLCHECKER)
// When the renderer requests the spelling service for correcting text, the
// render process host should call the remote spelling service.
......
......@@ -60,9 +60,6 @@ void SpellCheckHostMetrics::RecordCheckedWordStats(const base::string16& word,
RecordReplacedWordStats(0);
}
int percentage = (100 * misspelled_word_count_) / spellchecked_word_count_;
UMA_HISTOGRAM_PERCENTAGE("SpellCheck.MisspellRatio", percentage);
// Collects actual number of checked words, excluding duplication.
base::MD5Digest digest;
base::MD5Sum(reinterpret_cast<const unsigned char*>(word.c_str()),
......@@ -101,14 +98,6 @@ void SpellCheckHostMetrics::RecordSuggestionStats(int delta) {
void SpellCheckHostMetrics::RecordReplacedWordStats(int delta) {
replaced_word_count_ += delta;
if (misspelled_word_count_) {
// zero |misspelled_word_count_| is possible when an extension
// gives the misspelling, which is not recorded as a part of this
// metrics.
int percentage = (100 * replaced_word_count_) / misspelled_word_count_;
UMA_HISTOGRAM_PERCENTAGE("SpellCheck.ReplaceRatio", percentage);
}
if (suggestion_show_count_) {
int percentage = (100 * replaced_word_count_) / suggestion_show_count_;
UMA_HISTOGRAM_PERCENTAGE("SpellCheck.SuggestionHitRatio", percentage);
......
......@@ -14667,12 +14667,18 @@ should be kept until we remove incident reporting. -->
</histogram>
<histogram name="SpellCheck.MisspellRatio" units="%" expires_after="M90">
<obsolete>
Removed 2021/01: the relevant code path isn't used anymore.
</obsolete>
<owner>gujen@google.com</owner>
<owner>chrome-language@google.com</owner>
<summary>The percentage of misspelled words within checked words.</summary>
</histogram>
<histogram name="SpellCheck.ReplaceRatio" units="%" expires_after="M90">
<obsolete>
Removed 2021/01: the relevant code path isn't used anymore.
</obsolete>
<owner>gujen@google.com</owner>
<owner>chrome-language@google.com</owner>
<summary>The percentage of replaced words within misspelled words.</summary>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment