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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java

Issue 1905013002: Refine tracking of snippet dismissals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 4 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
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java
index 245a3c456c67f607c92a2a1ddd71e317d91cb9db..03d2c2ee6cc514c29b6c1200e892f7843049eae6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java
@@ -60,9 +60,11 @@ public class NewTabPageUma {
// The number of possible NTP impression types
private static final int NUM_NTP_IMPRESSION = 2;
- /** Possible interactions with the snippets. */
+ /** Possible interactions with the snippets.
+ * Do not remove or change existing values other than NUM_SNIPPETS_ACTIONS. */
@IntDef({SNIPPETS_ACTION_SHOWN, SNIPPETS_ACTION_SCROLLED, SNIPPETS_ACTION_CLICKED,
- SNIPPETS_ACTION_DISMISSED})
+ SNIPPETS_ACTION_DISMISSED_OBSOLETE, SNIPPETS_ACTION_DISMISSED_VISITED,
+ SNIPPETS_ACTION_DISMISSED_UNVISITED})
@Retention(RetentionPolicy.SOURCE)
public @interface SnippetsAction {}
/** Snippets are enabled and are being shown to the user. */
@@ -71,10 +73,14 @@ public class NewTabPageUma {
public static final int SNIPPETS_ACTION_SCROLLED = 1;
/** A snippet has been clicked. */
public static final int SNIPPETS_ACTION_CLICKED = 2;
- /** A snippet has been swiped away. */
- public static final int SNIPPETS_ACTION_DISMISSED = 3;
+ /** A snippet has been dismissed, made obsolete by the next two actions. */
+ public static final int SNIPPETS_ACTION_DISMISSED_OBSOLETE = 3;
+ /** A snippet has been swiped away, it had been viewed by the user (on this device). */
+ public static final int SNIPPETS_ACTION_DISMISSED_VISITED = 4;
+ /** A snippet has been swiped away, it had not been viewed by the user (on this device). */
+ public static final int SNIPPETS_ACTION_DISMISSED_UNVISITED = 5;
/** The number of possible actions. */
- private static final int NUM_SNIPPETS_ACTIONS = 4;
+ private static final int NUM_SNIPPETS_ACTIONS = 6;
/**
* Records an action taken by the user on the NTP.

Powered by Google App Engine
This is Rietveld 408576698