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

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

Issue 2906763002: [TTS] Add some initial signals for Tap in content. (Closed)
Patch Set: Just fix an off-by-one bug on an index bounds found by a failing test. 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
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 b1acdc6183018c7b86a0e7d97431344f19295235..589c9767b57634e37778c73a42e706e57c528bf2 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
@@ -803,6 +803,47 @@ public class ContextualSearchUma {
}
/**
+ * Log whether results were seen due to a Tap on a short word.
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isTapOnShortWord Whether this tap was on a "short" word.
+ */
+ public static void logTapShortWordSeen(
+ boolean wasSearchContentViewSeen, boolean isTapOnShortWord) {
+ if (!isTapOnShortWord) return;
+
+ // We just record CTR of short words.
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapShortWordSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, RESULTS_SEEN_BOUNDARY);
+ }
+
+ /**
+ * Log whether results were seen due to a Tap on a long word.
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isTapOnLongWord Whether this tap was on a long word.
+ */
+ public static void logTapLongWordSeen(
+ boolean wasSearchContentViewSeen, boolean isTapOnLongWord) {
+ if (!isTapOnLongWord) return;
+
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapLongWordSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, RESULTS_SEEN_BOUNDARY);
+ }
+
+ /**
+ * Log whether results were seen due to a Tap that was on the middle of a word.
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isTapOnWordMiddle Whether this tap was on the middle of a word.
+ */
+ public static void logTapOnWordMiddleSeen(
+ boolean wasSearchContentViewSeen, boolean isTapOnWordMiddle) {
+ if (!isTapOnWordMiddle) return;
+
+ // We just record CTR of words tapped in the "middle".
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapOnWordMiddleSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, RESULTS_SEEN_BOUNDARY);
+ }
+
+ /**
* Logs whether results were seen and whether any tap suppression heuristics were satisfied.
* @param wasSearchContentViewSeen If the panel was opened.
* @param wasAnySuppressionHeuristicSatisfied Whether any of the implemented suppression

Powered by Google App Engine
This is Rietveld 408576698