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