summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authormiguelg@chromium.org <miguelg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 16:51:30 +0000
committermiguelg@chromium.org <miguelg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 16:51:30 +0000
commit0d1323fb94bd198f3ecd264185dad2dcd5b8f16d (patch)
tree4073f0cb7f21f0a684f381d217f660c277f21efc /components
parent31928c5dc6aee9d91a4ae11df6a2c75a1445a7a2 (diff)
downloadchromium_src-0d1323fb94bd198f3ecd264185dad2dcd5b8f16d.zip
chromium_src-0d1323fb94bd198f3ecd264185dad2dcd5b8f16d.tar.gz
chromium_src-0d1323fb94bd198f3ecd264185dad2dcd5b8f16d.tar.bz2
[Translate]Add Uma stats for language changes in linux and android
BUG=311245 Review URL: https://codereview.chromium.org/48673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/translate/common/translate_metrics.cc9
-rw-r--r--components/translate/common/translate_metrics.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/components/translate/common/translate_metrics.cc b/components/translate/common/translate_metrics.cc
index b095084..5402491 100644
--- a/components/translate/common/translate_metrics.cc
+++ b/components/translate/common/translate_metrics.cc
@@ -23,6 +23,9 @@ const char kTranslateTimeToTranslate[] = "Translate.TimeToTranslate";
const char kTranslateUserActionDuration[] = "Translate.UserActionDuration";
const char kTranslatePageScheme[] = "Translate.PageScheme";
const char kTranslateSimilarLanguageMatch[] = "Translate.SimilarLanguageMatch";
+const char kTranslateModifyOriginalLang[] = "Translate.ModifyOriginalLang";
+const char kTranslateModifyTargetLang[] = "Translate.ModifyTargetlLang";
+
const char kSchemeHttp[] = "http";
const char kSchemeHttps[] = "https";
@@ -33,6 +36,8 @@ struct MetricsEntry {
};
// This entry table should be updated when new UMA items are added.
+// TODO(miguelg) Move kTranslateModifyOriginalLang and
+// kTranslateModifyTargetLang to the UX delegate once crbug/312720 is fixed.
const MetricsEntry kMetricsEntries[] = {
{UMA_LANGUAGE_DETECTION, kRenderer4LanguageDetection},
{UMA_CONTENT_LANGUAGE, kTranslateContentLanguage},
@@ -43,7 +48,9 @@ const MetricsEntry kMetricsEntries[] = {
{UMA_TIME_TO_TRANSLATE, kTranslateTimeToTranslate},
{UMA_USER_ACTION_DURATION, kTranslateUserActionDuration},
{UMA_PAGE_SCHEME, kTranslatePageScheme},
- {UMA_SIMILAR_LANGUAGE_MATCH, kTranslateSimilarLanguageMatch}, };
+ {UMA_SIMILAR_LANGUAGE_MATCH, kTranslateSimilarLanguageMatch},
+ {UMA_MODIFY_ORIGINAL_LANG, kTranslateModifyOriginalLang},
+ {UMA_MODIFY_TARGET_LANG, kTranslateModifyTargetLang}, };
COMPILE_ASSERT(arraysize(kMetricsEntries) == UMA_MAX,
arraysize_of_kMetricsEntries_should_be_UMA_MAX);
diff --git a/components/translate/common/translate_metrics.h b/components/translate/common/translate_metrics.h
index 9baa268..a38db44 100644
--- a/components/translate/common/translate_metrics.h
+++ b/components/translate/common/translate_metrics.h
@@ -24,6 +24,8 @@ enum MetricsNameIndex {
UMA_USER_ACTION_DURATION,
UMA_PAGE_SCHEME,
UMA_SIMILAR_LANGUAGE_MATCH,
+ UMA_MODIFY_ORIGINAL_LANG,
+ UMA_MODIFY_TARGET_LANG,
UMA_MAX,
};