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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java

Issue 2932623002: [TTS] Add onTouchDown to GestureStateListener. (Closed)
Patch Set: Adjusted the custom histograms to write all values and use a max of 1000 with 100 buckets. Created 3 years, 5 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/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 a49e129aa9ffb728d9fbddfe39ccd5e3a9bef1d0..52069708aeef0894647b7b18b41bde207f435cdf 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
@@ -802,6 +802,44 @@ public class ContextualSearchUma {
}
}
+ /**
+ * Logs whether results were seen based on the duration of the Tap, for both short and long
+ * durations.
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isTapShort Whether this tap was "short" in duration.
+ */
+ public static void logTapDurationSeen(boolean wasSearchContentViewSeen, boolean isTapShort) {
+ if (isTapShort) {
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapShortDurationSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN,
+ RESULTS_SEEN_BOUNDARY);
+ } else {
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapLongDurationSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN,
+ RESULTS_SEEN_BOUNDARY);
+ }
+ }
+
+ /**
+ * Logs the duration of a Tap in ms into custom histograms to profile the duration of seen
+ * and not seen taps.
+ * @param wasPanelSeen Whether the panel was seen.
+ * @param durationMs The duration of the tap gesture.
+ */
+ public static void logTapDuration(boolean wasPanelSeen, int durationMs) {
+ int min = 1;
+ int max = 1000;
+ int numBuckets = 100;
+
+ if (wasPanelSeen) {
+ RecordHistogram.recordCustomCountHistogram(
+ "Search.ContextualSearchTapDurationSeen", durationMs, min, max, numBuckets);
+ } else {
+ RecordHistogram.recordCustomCountHistogram(
+ "Search.ContextualSearchTapDurationNotSeen", durationMs, min, max, numBuckets);
+ }
+ }
+
/**
* Log whether results were seen due to a Tap on a short word.
* @param wasSearchContentViewSeen If the panel was opened.

Powered by Google App Engine
This is Rietveld 408576698