| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ |
| 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace translate { | 10 namespace translate { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 INITIATION_STATUS_DISABLED_BY_CONFIG, | 33 INITIATION_STATUS_DISABLED_BY_CONFIG, |
| 34 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED, | 34 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED, |
| 35 INITIATION_STATUS_URL_IS_NOT_SUPPORTED, | 35 INITIATION_STATUS_URL_IS_NOT_SUPPORTED, |
| 36 INITIATION_STATUS_SIMILAR_LANGUAGES, | 36 INITIATION_STATUS_SIMILAR_LANGUAGES, |
| 37 INITIATION_STATUS_ACCEPT_LANGUAGES, | 37 INITIATION_STATUS_ACCEPT_LANGUAGES, |
| 38 INITIATION_STATUS_AUTO_BY_CONFIG, | 38 INITIATION_STATUS_AUTO_BY_CONFIG, |
| 39 INITIATION_STATUS_AUTO_BY_LINK, | 39 INITIATION_STATUS_AUTO_BY_LINK, |
| 40 INITIATION_STATUS_SHOW_INFOBAR, | 40 INITIATION_STATUS_SHOW_INFOBAR, |
| 41 INITIATION_STATUS_MIME_TYPE_IS_NOT_SUPPORTED, | 41 INITIATION_STATUS_MIME_TYPE_IS_NOT_SUPPORTED, |
| 42 INITIATION_STATUS_DISABLED_BY_KEY, | 42 INITIATION_STATUS_DISABLED_BY_KEY, |
| 43 INITIATION_STATUS_LANGUAGE_IN_ULP, |
| 43 // Insert new items here. | 44 // Insert new items here. |
| 44 INITIATION_STATUS_MAX, | 45 INITIATION_STATUS_MAX, |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 // Called when Chrome Translate is initiated to report a reason of the next | 48 // Called when Chrome Translate is initiated to report a reason of the next |
| 48 // browser action. | 49 // browser action. |
| 49 void ReportInitiationStatus(InitiationStatusType type); | 50 void ReportInitiationStatus(InitiationStatusType type); |
| 50 | 51 |
| 51 // Called when Chrome opens the URL so that the user sends an error feedback. | 52 // Called when Chrome opens the URL so that the user sends an error feedback. |
| 52 void ReportLanguageDetectionError(); | 53 void ReportLanguageDetectionError(); |
| 53 | 54 |
| 54 void ReportLocalesOnDisabledByPrefs(const std::string& locale); | 55 void ReportLocalesOnDisabledByPrefs(const std::string& locale); |
| 55 | 56 |
| 56 // Called when Chrome Translate server sends the language list which includes | 57 // Called when Chrome Translate server sends the language list which includes |
| 57 // a undisplayable language in the user's locale. | 58 // a undisplayable language in the user's locale. |
| 58 void ReportUndisplayableLanguage(const std::string& language); | 59 void ReportUndisplayableLanguage(const std::string& language); |
| 59 | 60 |
| 60 void ReportUnsupportedLanguageAtInitiation(const std::string& language); | 61 void ReportUnsupportedLanguageAtInitiation(const std::string& language); |
| 61 | 62 |
| 62 // Provides UMA entry names for unit tests. | 63 // Provides UMA entry names for unit tests. |
| 63 const char* GetMetricsName(MetricsNameIndex index); | 64 const char* GetMetricsName(MetricsNameIndex index); |
| 64 | 65 |
| 65 } // namespace TranslateBrowserMetrics | 66 } // namespace TranslateBrowserMetrics |
| 66 | 67 |
| 67 } // namespace translate | 68 } // namespace translate |
| 68 | 69 |
| 69 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ | 70 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ |
| OLD | NEW |