Chromium Code Reviews| 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_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ |
| 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ |
| 7 | 7 |
| 8 namespace TranslateManagerMetrics { | 8 namespace TranslateManagerMetrics { |
| 9 | 9 |
| 10 // An indexing type to query each UMA entry name via GetMetricsName() function. | |
| 11 // Note: |kMetricsEntries| should be updated when a new entry is added here. | |
| 10 enum MetricsNameIndex { | 12 enum MetricsNameIndex { |
| 11 UMA_INITIATION_STATUS, | 13 UMA_INITIATION_STATUS, |
| 14 UMA_LANGUAGE_DETECTION_ERROR, | |
| 15 UMA_SERVER_REPORTED_UNSUPPORTED_LANGUAGE, | |
| 12 UMA_MAX, | 16 UMA_MAX, |
| 13 }; | 17 }; |
| 14 | 18 |
| 15 // When Chrome Translate is ready to translate a page, one of following reason | 19 // When Chrome Translate is ready to translate a page, one of following reason |
| 16 // decide the next browser action. | 20 // decide the next browser action. |
| 17 enum InitiationStatusType { | 21 enum InitiationStatusType { |
| 18 INITIATION_STATUS_DISABLED_BY_PREFS, | 22 INITIATION_STATUS_DISABLED_BY_PREFS, |
| 19 INITIATION_STATUS_DISABLED_BY_SWITCH, | 23 INITIATION_STATUS_DISABLED_BY_SWITCH, |
| 20 INITIATION_STATUS_DISABLED_BY_CONFIG, | 24 INITIATION_STATUS_DISABLED_BY_CONFIG, |
| 21 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED, | 25 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED, |
| 22 INITIATION_STATUS_URL_IS_NOT_SUPPORTED, | 26 INITIATION_STATUS_URL_IS_NOT_SUPPORTED, |
| 23 INITIATION_STATUS_SIMILAR_LANGUAGES, | 27 INITIATION_STATUS_SIMILAR_LANGUAGES, |
| 24 INITIATION_STATUS_ACCEPT_LANGUAGES, | 28 INITIATION_STATUS_ACCEPT_LANGUAGES, |
| 25 | 29 |
| 26 INITIATION_STATUS_AUTO_BY_CONFIG, | 30 INITIATION_STATUS_AUTO_BY_CONFIG, |
| 27 INITIATION_STATUS_AUTO_BY_LINK, | 31 INITIATION_STATUS_AUTO_BY_LINK, |
| 28 INITIATION_STATUS_SHOW_INFOBAR, | 32 INITIATION_STATUS_SHOW_INFOBAR, |
| 29 | 33 |
| 30 INITIATION_STATUS_MAX, | 34 INITIATION_STATUS_MAX, |
| 31 }; | 35 }; |
| 32 | 36 |
| 33 // Called when Chrome Translate is initiated to report a reason of the next | 37 // Called when Chrome Translate is initiated to report a reason of the next |
| 34 // browser action. | 38 // browser action. |
| 35 void ReportInitiationStatus(InitiationStatusType type); | 39 void ReportInitiationStatus(InitiationStatusType type); |
| 36 | 40 |
| 41 // Called when Chrome opens the URL so that the user sends an error feedback. | |
| 42 void ReportLanguageDetectionError(); | |
| 43 | |
| 44 // Called when it's turned out that translating page is in unsupported language. | |
|
MAD
2013/05/15 01:32:48
it's turned -> it turns
Takashi Toyoshima
2013/05/15 07:35:04
thanks!
| |
| 45 void ReportUnsupportedLanguage(); | |
| 46 | |
| 37 // Provides UMA entry names for unit tests. | 47 // Provides UMA entry names for unit tests. |
| 38 const char* GetMetricsName(MetricsNameIndex index); | 48 const char* GetMetricsName(MetricsNameIndex index); |
| 39 | 49 |
| 40 } // namespace TranslateManagerMetrics | 50 } // namespace TranslateManagerMetrics |
| 41 | 51 |
| 42 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ | 52 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ |
| OLD | NEW |