| 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 21 matching lines...) Expand all Loading... |
| 32 INITIATION_STATUS_DISABLED_BY_SWITCH, | 32 INITIATION_STATUS_DISABLED_BY_SWITCH, |
| 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 // Insert new items here. | 43 // Insert new items here. |
| 43 INITIATION_STATUS_MAX, | 44 INITIATION_STATUS_MAX, |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 // Called when Chrome Translate is initiated to report a reason of the next | 47 // Called when Chrome Translate is initiated to report a reason of the next |
| 47 // browser action. | 48 // browser action. |
| 48 void ReportInitiationStatus(InitiationStatusType type); | 49 void ReportInitiationStatus(InitiationStatusType type); |
| 49 | 50 |
| 50 // Called when Chrome opens the URL so that the user sends an error feedback. | 51 // Called when Chrome opens the URL so that the user sends an error feedback. |
| 51 void ReportLanguageDetectionError(); | 52 void ReportLanguageDetectionError(); |
| 52 | 53 |
| 53 void ReportLocalesOnDisabledByPrefs(const std::string& locale); | 54 void ReportLocalesOnDisabledByPrefs(const std::string& locale); |
| 54 | 55 |
| 55 // Called when Chrome Translate server sends the language list which includes | 56 // Called when Chrome Translate server sends the language list which includes |
| 56 // a undisplayable language in the user's locale. | 57 // a undisplayable language in the user's locale. |
| 57 void ReportUndisplayableLanguage(const std::string& language); | 58 void ReportUndisplayableLanguage(const std::string& language); |
| 58 | 59 |
| 59 void ReportUnsupportedLanguageAtInitiation(const std::string& language); | 60 void ReportUnsupportedLanguageAtInitiation(const std::string& language); |
| 60 | 61 |
| 61 // Provides UMA entry names for unit tests. | 62 // Provides UMA entry names for unit tests. |
| 62 const char* GetMetricsName(MetricsNameIndex index); | 63 const char* GetMetricsName(MetricsNameIndex index); |
| 63 | 64 |
| 64 } // namespace TranslateBrowserMetrics | 65 } // namespace TranslateBrowserMetrics |
| 65 | 66 |
| 66 } // namespace translate | 67 } // namespace translate |
| 67 | 68 |
| 68 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ | 69 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_BROWSER_METRICS_H_ |
| OLD | NEW |