| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | 5 #include "components/spellcheck/browser/spellcheck_host_metrics.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/md5.h" | 9 #include "base/md5.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 | 11 |
| 12 SpellCheckHostMetrics::SpellCheckHostMetrics() | 12 SpellCheckHostMetrics::SpellCheckHostMetrics() |
| 13 : misspelled_word_count_(0), | 13 : misspelled_word_count_(0), |
| 14 last_misspelled_word_count_(-1), | 14 last_misspelled_word_count_(-1), |
| 15 spellchecked_word_count_(0), | 15 spellchecked_word_count_(0), |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 if (suggestion_show_count_ != last_suggestion_show_count_) { | 140 if (suggestion_show_count_ != last_suggestion_show_count_) { |
| 141 DCHECK(suggestion_show_count_ > last_suggestion_show_count_); | 141 DCHECK(suggestion_show_count_ > last_suggestion_show_count_); |
| 142 UMA_HISTOGRAM_COUNTS("SpellCheck.ShownSuggestions", suggestion_show_count_); | 142 UMA_HISTOGRAM_COUNTS("SpellCheck.ShownSuggestions", suggestion_show_count_); |
| 143 last_suggestion_show_count_ = suggestion_show_count_; | 143 last_suggestion_show_count_ = suggestion_show_count_; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 void SpellCheckHostMetrics::RecordSpellingServiceStats(bool enabled) { | 147 void SpellCheckHostMetrics::RecordSpellingServiceStats(bool enabled) { |
| 148 UMA_HISTOGRAM_BOOLEAN("SpellCheck.SpellingService.Enabled", enabled); | 148 UMA_HISTOGRAM_BOOLEAN("SpellCheck.SpellingService.Enabled", enabled); |
| 149 } | 149 } |
| OLD | NEW |