Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Unified Diff: components/translate/core/common/translate_metrics.h

Issue 2825943002: Removed translate MetricsNameIndex. (Closed)
Patch Set: Fixed string declarations. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/translate/core/common/translate_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/common/translate_metrics.h
diff --git a/components/translate/core/common/translate_metrics.h b/components/translate/core/common/translate_metrics.h
index b1cf988907b4a6689aaf1817fa481bf386dc3c40..5dfbfb2695a2231c89a9332aa8b51624eca8250c 100644
--- a/components/translate/core/common/translate_metrics.h
+++ b/components/translate/core/common/translate_metrics.h
@@ -11,22 +11,24 @@
namespace translate {
-// An indexing type to query each UMA entry name via GetMetricsName() function.
-// Note: |kMetricsEntries| should be updated when a new entry is added here.
-enum MetricsNameIndex {
- UMA_LANGUAGE_DETECTION,
- UMA_CONTENT_LANGUAGE,
- UMA_HTML_LANG,
- UMA_LANGUAGE_VERIFICATION,
- UMA_TIME_TO_BE_READY,
- UMA_TIME_TO_LOAD,
- UMA_TIME_TO_TRANSLATE,
- UMA_USER_ACTION_DURATION,
- UMA_PAGE_SCHEME,
- UMA_SIMILAR_LANGUAGE_MATCH,
- UMA_LANGUAGE_DETECTION_CONFLICT,
- UMA_MAX,
-};
+// Internals exposed for testing purposes. Should not be relied on by client
+// code.
+namespace metrics_internal {
+
+// Constant string values to indicate UMA names.
+extern const char kRenderer4LanguageDetection[];
+extern const char kTranslateContentLanguage[];
+extern const char kTranslateHtmlLang[];
+extern const char kTranslateLanguageVerification[];
+extern const char kTranslateTimeToBeReady[];
+extern const char kTranslateTimeToLoad[];
+extern const char kTranslateTimeToTranslate[];
+extern const char kTranslateUserActionDuration[];
+extern const char kTranslatePageScheme[];
+extern const char kTranslateSimilarLanguageMatch[];
+extern const char kTranslateLanguageDetectionConflict[];
+
+} // namespace metrics_internal
// A page may provide a Content-Language HTTP header or a META tag.
// TranslateHelper checks if a server provides a valid Content-Language.
@@ -102,9 +104,6 @@ void ReportSimilarLanguageMatch(bool match);
void ReportLanguageDetectionConflict(const std::string& page_lang,
const std::string& cld_lang);
-// Gets UMA name for an entry specified by |index|.
-const char* GetMetricsName(MetricsNameIndex index);
-
} // namespace translate
#endif // COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_METRICS_H_
« no previous file with comments | « no previous file | components/translate/core/common/translate_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698