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

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: 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..a686b9cb1bcb00a8b7262951b316582c9293a874 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,50 @@ public class ContextualSearchUma {
}
/**
+ * Log whether results were seen due to a Tap that may have been near the edge of a word.
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isNearWordEdge Whether this tap was near the edge of a word.
+ */
+ public static void logTapWordEdgeSeen(
+ boolean wasSearchContentViewSeen, boolean isNearWordEdge) {
+ if (!isNearWordEdge) {
+ // We just record CTR of words tapped in the "middle".
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchNotNearWordEdgeSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN,
+ RESULTS_SEEN_BOUNDARY);
+ }
+ }
+
+ /**
+ * Log whether results were seen due to a Tap on a short word.
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isShortWord Whether this tap was on a "short" word.
+ */
+ public static void logTapShortWordSeen(boolean wasSearchContentViewSeen, boolean isShortWord) {
+ if (isShortWord) {
+ // We just record CTR of short words.
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchShortWordSeen",
+ wasSearchContentViewSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN,
+ RESULTS_SEEN_BOUNDARY);
+ }
+ }
+
+ /**
+ * Log whether results were seen due to a Tap on a word considered not "long enough".
+ * @param wasSearchContentViewSeen If the panel was opened.
+ * @param isWordNotLongEnough Whether this tap was on a word that wasn't quite long.
+ */
+ public static void logTapWordNotLongEnoughSeen(
+ boolean wasSearchContentViewSeen, boolean isWordNotLongEnough) {
+ if (!isWordNotLongEnough) {
+ // We just record CTR of long words.
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchLongWordSeen",
+ 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