| 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 15 matching lines...) Expand all Loading... |
| 26 // The lifetime of the object should be managed by a caller, | 26 // The lifetime of the object should be managed by a caller, |
| 27 // and the lifetime should be longer than SpellCheckHost instance | 27 // and the lifetime should be longer than SpellCheckHost instance |
| 28 // because SpellCheckHost will use the object. | 28 // because SpellCheckHost will use the object. |
| 29 class SpellCheckHostMetrics { | 29 class SpellCheckHostMetrics { |
| 30 public: | 30 public: |
| 31 SpellCheckHostMetrics(); | 31 SpellCheckHostMetrics(); |
| 32 ~SpellCheckHostMetrics(); | 32 ~SpellCheckHostMetrics(); |
| 33 | 33 |
| 34 // Collects the number of words in the custom dictionary, which is | 34 // Collects the number of words in the custom dictionary, which is |
| 35 // to be uploaded via UMA. | 35 // to be uploaded via UMA. |
| 36 void RecordCustomWordCountStats(size_t count); | 36 static void RecordCustomWordCountStats(size_t count); |
| 37 | 37 |
| 38 // Collects status of spellchecking enabling state, which is | 38 // Collects status of spellchecking enabling state, which is |
| 39 // to be uploaded via UMA | 39 // to be uploaded via UMA |
| 40 void RecordEnabledStats(bool enabled); | 40 void RecordEnabledStats(bool enabled); |
| 41 | 41 |
| 42 // Collects a histogram for dictionary corruption rate | 42 // Collects a histogram for dictionary corruption rate |
| 43 // to be uploaded via UMA | 43 // to be uploaded via UMA |
| 44 void RecordDictionaryCorruptionStats(bool corrupted); | 44 void RecordDictionaryCorruptionStats(bool corrupted); |
| 45 | 45 |
| 46 // Collects status of spellchecking enabling state, which is | 46 // Collects status of spellchecking enabling state, which is |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 int last_unique_word_count_; | 85 int last_unique_word_count_; |
| 86 | 86 |
| 87 // Time when first spellcheck happened. | 87 // Time when first spellcheck happened. |
| 88 base::TimeTicks start_time_; | 88 base::TimeTicks start_time_; |
| 89 // Set of checked words in the hashed form. | 89 // Set of checked words in the hashed form. |
| 90 base::hash_set<std::string> checked_word_hashes_; | 90 base::hash_set<std::string> checked_word_hashes_; |
| 91 base::RepeatingTimer<SpellCheckHostMetrics> recording_timer_; | 91 base::RepeatingTimer<SpellCheckHostMetrics> recording_timer_; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ | 94 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ |
| OLD | NEW |