OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_COMMON_TRANSLATE_TRANSLATE_COMMON_METRICS_H_ | 5 #ifndef COMPONENTS_TRANSLATE_COMMON_TRANSLATE_METRICS_H_ |
6 #define CHROME_COMMON_TRANSLATE_TRANSLATE_COMMON_METRICS_H_ | 6 #define COMPONENTS_TRANSLATE_COMMON_TRANSLATE_METRICS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 | 11 |
12 namespace TranslateCommonMetrics { | 12 namespace translate { |
13 | 13 |
14 // An indexing type to query each UMA entry name via GetMetricsName() function. | 14 // An indexing type to query each UMA entry name via GetMetricsName() function. |
15 // Note: |kMetricsEntries| should be updated when a new entry is added here. | 15 // Note: |kMetricsEntries| should be updated when a new entry is added here. |
16 enum MetricsNameIndex { | 16 enum MetricsNameIndex { |
17 UMA_LANGUAGE_DETECTION, | 17 UMA_LANGUAGE_DETECTION, |
18 UMA_CONTENT_LANGUAGE, | 18 UMA_CONTENT_LANGUAGE, |
19 UMA_HTML_LANG, | 19 UMA_HTML_LANG, |
20 UMA_LANGUAGE_VERIFICATION, | 20 UMA_LANGUAGE_VERIFICATION, |
21 UMA_TIME_TO_BE_READY, | 21 UMA_TIME_TO_BE_READY, |
22 UMA_TIME_TO_LOAD, | 22 UMA_TIME_TO_LOAD, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // Called when CLD detects page language. | 92 // Called when CLD detects page language. |
93 void ReportLanguageDetectionTime(base::TimeTicks begin, base::TimeTicks end); | 93 void ReportLanguageDetectionTime(base::TimeTicks begin, base::TimeTicks end); |
94 | 94 |
95 // Called when CLD agreed on a language which is different, but in the similar | 95 // Called when CLD agreed on a language which is different, but in the similar |
96 // language list. | 96 // language list. |
97 void ReportSimilarLanguageMatch(bool match); | 97 void ReportSimilarLanguageMatch(bool match); |
98 | 98 |
99 // Gets UMA name for an entry specified by |index|. | 99 // Gets UMA name for an entry specified by |index|. |
100 const char* GetMetricsName(MetricsNameIndex index); | 100 const char* GetMetricsName(MetricsNameIndex index); |
101 | 101 |
102 } // namespace TranslateCommonMetrics | 102 } // namespace translate |
103 | 103 |
104 #endif // CHROME_COMMON_TRANSLATE_TRANSLATE_COMMON_METRICS_H_ | 104 #endif // COMPONENTS_TRANSLATE_COMMON_TRANSLATE_METRICS_H_ |
OLD | NEW |