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 5dd1044979f1adda4bf98a3a8706b6df4feedf78..c8a9a6d1a65e1e73c3475c966c01ef3effa0aae0 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 |
@@ -1171,6 +1171,30 @@ public class ContextualSearchUma { |
} |
/** |
+ * Logs the number of impressions and CTR for the previous week for the current user. |
+ * @param previousWeekImpressions The number of times the user saw the Contextual Search Bar. |
+ * @param previousWeekCtr The CTR expressed as a percentage. |
+ */ |
+ public static void logPreviousWeekCtr(int previousWeekImpressions, int previousWeekCtr) { |
+ RecordHistogram.recordCountHistogram( |
+ "Search.ContextualSearchPreviousWeekImpressions", previousWeekImpressions); |
+ RecordHistogram.recordPercentageHistogram( |
+ "Search.ContextualSearchPreviousWeekCtr", previousWeekCtr); |
+ } |
+ |
+ /** |
+ * Logs the number of impressions and CTR for previous 28-day period for the current user. |
+ * @param previous28DayImpressions The number of times the user saw the Contextual Search Bar. |
+ * @param previous28DayCtr The CTR expressed as a percentage. |
+ */ |
+ public static void logPrevious28DayCtr(int previous28DayImpressions, int previous28DayCtr) { |
+ RecordHistogram.recordCountHistogram( |
+ "Search.ContextualSearchPrevious28DayImpressions", previous28DayImpressions); |
+ RecordHistogram.recordPercentageHistogram( |
+ "Search.ContextualSearchPrevious28DayCtr", previous28DayCtr); |
+ } |
+ |
+ /** |
* Get the encoded value to use for the Bar Overlap histogram by encoding all the input |
* parameters. |
* @param didBarOverlap Whether the selection overlapped the Bar position. |