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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
14 #include "base/strings/string16.h" | |
15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
16 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
17 | 16 |
18 // A helper object for recording spell-check related histograms. | 17 // A helper object for recording spell-check related histograms. |
19 // This class encapsulates histogram names and metrics API. | 18 // This class encapsulates histogram names and metrics API. |
20 // This also carries a set of counters for collecting histograms | 19 // This also carries a set of counters for collecting histograms |
21 // and a timer for making a periodical summary. | 20 // and a timer for making a periodical summary. |
22 // | 21 // |
23 // We expect a user of SpellCheckHost class to instantiate this object, | 22 // We expect a user of SpellCheckHost class to instantiate this object, |
24 // and pass the metrics object to SpellCheckHost's factory method. | 23 // and pass the metrics object to SpellCheckHost's factory method. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 int last_unique_word_count_; | 87 int last_unique_word_count_; |
89 | 88 |
90 // Time when first spellcheck happened. | 89 // Time when first spellcheck happened. |
91 base::TimeTicks start_time_; | 90 base::TimeTicks start_time_; |
92 // Set of checked words in the hashed form. | 91 // Set of checked words in the hashed form. |
93 base::hash_set<std::string> checked_word_hashes_; | 92 base::hash_set<std::string> checked_word_hashes_; |
94 base::RepeatingTimer recording_timer_; | 93 base::RepeatingTimer recording_timer_; |
95 }; | 94 }; |
96 | 95 |
97 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ | 96 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ |
OLD | NEW |