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

Unified Diff: chrome/browser/views/infobars/translate_infobars.cc

Issue 853010: Adding UMA stats to the translate UI so we can get user usage... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: Created 10 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 | « chrome/browser/translate/translate_infobars_delegates.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/infobars/translate_infobars.cc
===================================================================
--- chrome/browser/views/infobars/translate_infobars.cc (revision 41336)
+++ chrome/browser/views/infobars/translate_infobars.cc (working copy)
@@ -548,22 +548,27 @@
void TranslateInfoBar::ExecuteCommand(int command_id) {
if (command_id >= IDC_TRANSLATE_TARGET_LANGUAGE_BASE) {
+ UMA_HISTOGRAM_COUNTS("Translate.ModifyTargetLang", 1);
kuan 2010/03/13 00:47:31 maybe call this in TranslateInfoBarDelegate::Modif
jcampan 2010/03/13 00:58:48 The goal of these UMA stats is to provide us with
OnLanguageModified(target_language_menu_button_,
command_id - IDC_TRANSLATE_TARGET_LANGUAGE_BASE);
} else if (command_id >= IDC_TRANSLATE_ORIGINAL_LANGUAGE_BASE) {
+ UMA_HISTOGRAM_COUNTS("Translate.ModifyOriginalLang", 1);
kuan 2010/03/13 00:47:31 maybe call this in TranslateInfoBarDelegate::Modif
jcampan 2010/03/13 00:58:48 Same remark as above.
OnLanguageModified(original_language_menu_button_,
command_id - IDC_TRANSLATE_ORIGINAL_LANGUAGE_BASE);
} else {
switch (command_id) {
case IDC_TRANSLATE_OPTIONS_NEVER_TRANSLATE_LANG:
+ UMA_HISTOGRAM_COUNTS("Translate.NeverTranslateLang", 1);
GetDelegate()->ToggleLanguageBlacklist();
kuan 2010/03/13 00:47:31 maybe move the uma call to delegate's ToggleLangua
jcampan 2010/03/13 00:58:48 Same remark as above.
break;
case IDC_TRANSLATE_OPTIONS_NEVER_TRANSLATE_SITE:
+ UMA_HISTOGRAM_COUNTS("Translate.NeverTranslateSite", 1);
GetDelegate()->ToggleSiteBlacklist();
kuan 2010/03/13 00:47:31 maybe move the uma call to delegate's ToggleSiteBl
jcampan 2010/03/13 00:58:48 Same remark as above.
break;
case IDC_TRANSLATE_OPTIONS_ALWAYS:
+ UMA_HISTOGRAM_COUNTS("Translate.AlwaysTranslateLang", 1);
GetDelegate()->ToggleAlwaysTranslate();
kuan 2010/03/13 00:47:31 maybe move the uma call to delegate's ToggleAlways
jcampan 2010/03/13 00:58:48 Same remark as above.
break;
@@ -592,8 +597,10 @@
if (sender == accept_button_) {
GetDelegate()->Translate();
UpdateState(GetDelegate()->state());
+ UMA_HISTOGRAM_COUNTS("Translate.Translate", 1);
kuan 2010/03/13 00:47:31 maybe move the uma call to delegate's Translate.
jcampan 2010/03/13 00:58:48 If we do that, we won't know if it is an automatic
} else if (sender == deny_button_) {
GetDelegate()->TranslationDeclined();
+ UMA_HISTOGRAM_COUNTS("Translate.DeclineTranslate", 1);
kuan 2010/03/13 00:47:31 maybe move the uma call to TranslationDeclined.
jcampan 2010/03/13 00:58:48 If we do that we won't be able to differentiate wh
RemoveInfoBar();
} else { // Let base InfoBar handle close button.
InfoBar::ButtonPressed(sender, event);
« no previous file with comments | « chrome/browser/translate/translate_infobars_delegates.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698