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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java

Issue 2886873006: Add logging events for auto-always, auto-never (new translate infobar) (Closed)
Patch Set: Created 3 years, 7 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 | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
index 13a6e251cd92f1cf7163ddfc2cefd06db1f9d1e8..e394bc8ca3b7d6cee4bc7983223520de1db2211c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
@@ -90,8 +90,11 @@ class TranslateCompactInfoBar extends InfoBar
private static final int INFOBAR_SNACKBAR_CANCEL_NEVER = 18;
private static final int INFOBAR_ALWAYS_TRANSLATE_UNDO = 19;
private static final int INFOBAR_CLOSE = 20;
- private static final int INFOBAR_HISTOGRAM_BOUNDARY = 21;
- // TODO(martiw): create the values for the impressions/cancels of auto-always and auto-never.
+ private static final int INFOBAR_SNACKBAR_AUTO_ALWAYS_IMPRESSION = 21;
+ private static final int INFOBAR_SNACKBAR_AUTO_NEVER_IMPRESSION = 22;
+ private static final int INFOBAR_SNACKBAR_CANCEL_AUTO_ALWAYS = 23;
+ private static final int INFOBAR_SNACKBAR_CANCEL_AUTO_NEVER = 24;
+ private static final int INFOBAR_HISTOGRAM_BOUNDARY = 25;
// Need 2 instances of TranslateMenuHelper to prevent a race condition bug which happens when
// showing language menu after dismissing overflow menu.
@@ -117,14 +120,16 @@ class TranslateCompactInfoBar extends InfoBar
public void onAction(Object actionData) {
switch (mActionId) {
case ACTION_OVERFLOW_ALWAYS_TRANSLATE:
- case ACTION_AUTO_ALWAYS_TRANSLATE:
recordInfobarAction(INFOBAR_SNACKBAR_CANCEL_ALWAYS);
return;
+ case ACTION_AUTO_ALWAYS_TRANSLATE:
+ recordInfobarAction(INFOBAR_SNACKBAR_CANCEL_AUTO_ALWAYS);
+ return;
case ACTION_OVERFLOW_NEVER_LANGUAGE:
recordInfobarAction(INFOBAR_SNACKBAR_CANCEL_NEVER);
return;
case ACTION_AUTO_NEVER_LANGUAGE:
- recordInfobarAction(INFOBAR_SNACKBAR_CANCEL_NEVER);
+ recordInfobarAction(INFOBAR_SNACKBAR_CANCEL_AUTO_NEVER);
// This snackbar is triggered automatically after a close button click. Need to
// dismiss the infobar even if the user cancels the "Never Translate".
performCloseButtonActionWithoutDeniedCheck();
@@ -411,13 +416,17 @@ class TranslateCompactInfoBar extends InfoBar
}
switch (actionId) {
case ACTION_OVERFLOW_ALWAYS_TRANSLATE:
- case ACTION_AUTO_ALWAYS_TRANSLATE:
recordInfobarAction(INFOBAR_SNACKBAR_ALWAYS_TRANSLATE_IMPRESSION);
break;
+ case ACTION_AUTO_ALWAYS_TRANSLATE:
+ recordInfobarAction(INFOBAR_SNACKBAR_AUTO_ALWAYS_IMPRESSION);
+ break;
case ACTION_OVERFLOW_NEVER_LANGUAGE:
- case ACTION_AUTO_NEVER_LANGUAGE:
recordInfobarAction(INFOBAR_SNACKBAR_NEVER_TRANSLATE_IMPRESSION);
break;
+ case ACTION_AUTO_NEVER_LANGUAGE:
+ recordInfobarAction(INFOBAR_SNACKBAR_AUTO_NEVER_IMPRESSION);
+ break;
case ACTION_OVERFLOW_NEVER_SITE:
recordInfobarAction(INFOBAR_SNACKBAR_NEVER_TRANSLATE_SITE_IMPRESSION);
break;
« no previous file with comments | « no previous file | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698