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 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ | 5 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ |
6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ | 6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void RecordCheckedWordStats(const string16& word, bool misspell); | 48 void RecordCheckedWordStats(const string16& word, bool misspell); |
49 | 49 |
50 // Collects a histogram for misspelled word replacement | 50 // Collects a histogram for misspelled word replacement |
51 // to be uploaded via UMA | 51 // to be uploaded via UMA |
52 void RecordReplacedWordStats(int delta); | 52 void RecordReplacedWordStats(int delta); |
53 | 53 |
54 // Collects a histogram for context menu showing as a spell correction | 54 // Collects a histogram for context menu showing as a spell correction |
55 // attempt to be uploaded via UMA | 55 // attempt to be uploaded via UMA |
56 void RecordSuggestionStats(int delta); | 56 void RecordSuggestionStats(int delta); |
57 | 57 |
| 58 // Records if spelling service is enabled or disabled. |
| 59 void RecordSpellingServiceStats(bool enabled); |
| 60 |
58 private: | 61 private: |
59 friend class SpellcheckHostMetricsTest; | 62 friend class SpellcheckHostMetricsTest; |
60 void OnHistogramTimerExpired(); | 63 void OnHistogramTimerExpired(); |
61 | 64 |
62 // Records various counters without changing their values. | 65 // Records various counters without changing their values. |
63 void RecordWordCounts(); | 66 void RecordWordCounts(); |
64 | 67 |
65 // Number of corrected words of checked words. | 68 // Number of corrected words of checked words. |
66 int misspelled_word_count_; | 69 int misspelled_word_count_; |
67 int last_misspelled_word_count_; | 70 int last_misspelled_word_count_; |
(...skipping 14 matching lines...) Expand all Loading... |
82 int last_unique_word_count_; | 85 int last_unique_word_count_; |
83 | 86 |
84 // Time when first spellcheck happened. | 87 // Time when first spellcheck happened. |
85 base::TimeTicks start_time_; | 88 base::TimeTicks start_time_; |
86 // Set of checked words in the hashed form. | 89 // Set of checked words in the hashed form. |
87 base::hash_set<std::string> checked_word_hashes_; | 90 base::hash_set<std::string> checked_word_hashes_; |
88 base::RepeatingTimer<SpellCheckHostMetrics> recording_timer_; | 91 base::RepeatingTimer<SpellCheckHostMetrics> recording_timer_; |
89 }; | 92 }; |
90 | 93 |
91 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ | 94 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ |
OLD | NEW |