Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java |
index 573e7d1ceab2af2cc1e09214c17e31fb2fcf5ebf..4c993efee985ab07372ef22c2b905ae4fd20ff62 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java |
@@ -880,6 +880,40 @@ public class ContextualSearchUma { |
} |
/** |
+ * Log whether the UX was suppressed due to a Tap with broad signals. |
+ * @param wasSuppressed Whether showing the UX was suppressed. |
+ * @param isSecondTap Whether this was the second tap after an initial suppressed tap. |
+ */ |
+ public static void logTapSuppression(boolean wasSuppressed, boolean isSecondTap) { |
Donn Denman
2016/06/28 23:39:08
I decided we don't really need these -- we'll know
|
+ if (isSecondTap) { |
+ // Note that we currently never suppress the second Tap, but we will soon. |
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapTwiceSuppressed", |
+ wasSuppressed ? TAP_SUPPRESSED : NOT_TAP_SUPPRESSED, TAP_SUPPRESSED_BOUNDARY); |
+ } else { |
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapSuppressed", |
+ wasSuppressed ? TAP_SUPPRESSED : NOT_TAP_SUPPRESSED, TAP_SUPPRESSED_BOUNDARY); |
+ } |
+ } |
+ |
+ /** |
+ * Log whether results were seen due to a Tap with broad signals. |
+ * @param wasSearchContentViewSeen If the panel was opened. |
+ * @param isSecondTap Whether this was the second tap after an initial suppressed tap. |
+ */ |
+ public static void logTapSuppressionResultsSeen( |
+ boolean wasSearchContentViewSeen, boolean isSecondTap) { |
+ if (isSecondTap) { |
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchSecondTapSeen", |
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, |
+ RESULTS_SEEN_BOUNDARY); |
+ } else { |
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapSuppressionSeen", |
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, |
twellington
2016/06/27 18:44:01
Will this ever get called when the panel was shown
Donn Denman
2016/06/28 23:39:08
Yes, this is called when the panel is shown for th
Theresa
2016/06/29 01:51:57
That makes sense, thanks.
Donn Denman
2016/06/29 02:30:36
Actually these two histograms should split the ove
Theresa
2016/06/29 02:42:53
I wasn't considering the second tap getting logged
|
+ RESULTS_SEEN_BOUNDARY); |
+ } |
+ } |
+ |
+ /** |
* Logs whether search results were seen, whether the search provider icon sprite was animated |
* when the panel first appeared, and the triggering gesture. |
* @param wasIconSpriteAnimated Whether the search provider icon sprite was animated when the |