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

Unified Diff: components/translate/core/browser/translate_manager.cc

Issue 2757173002: Fix counting of ULP and DISABLED_BY_PREF. (Closed)
Patch Set: rebase to include lastest code changes. For real this time. Created 3 years, 9 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 | « components/metrics/proto/translate_event.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_manager.cc
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
index ea1a1f9ecc19b521e93c012f8ca06658dc525964..92de40f1fb82a73d0336622d3c2c87fcddc2d68c 100644
--- a/components/translate/core/browser/translate_manager.cc
+++ b/components/translate/core/browser/translate_manager.cc
@@ -182,6 +182,7 @@ void TranslateManager::InitiateTranslation(const std::string& page_lang) {
if (!prefs->GetBoolean(prefs::kEnableTranslate)) {
TranslateBrowserMetrics::ReportInitiationStatus(
TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_PREFS);
+ RecordTranslateEvent(metrics::TranslateEventProto::DISABLED_BY_PREF);
const std::string& locale =
TranslateDownloadManager::GetInstance()->application_locale();
TranslateBrowserMetrics::ReportLocalesOnDisabledByPrefs(locale);
@@ -295,7 +296,7 @@ void TranslateManager::InitiateTranslation(const std::string& page_lang) {
if (LanguageInULP(language_code)) {
TranslateBrowserMetrics::ReportInitiationStatus(
TranslateBrowserMetrics::INITIATION_STATUS_LANGUAGE_IN_ULP);
- RecordTranslateEvent(metrics::TranslateEventProto::DISABLED_BY_PREF);
+ RecordTranslateEvent(metrics::TranslateEventProto::LANGUAGE_IN_ULP);
return;
}
« no previous file with comments | « components/metrics/proto/translate_event.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698