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

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

Issue 1123313006: Revert of [Contextual Search] Remove opt-in code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 b944ef99212887f5edb2e609ed8f6bb089131348..c0b5e1bb095bcb636d6c12bda36d8adedba085ec 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
@@ -412,6 +412,17 @@
* Logs the state of the Contextual Search preference. This function should be called if the
* Contextual Search feature is enabled, and will track the different preference settings
* (disabled, enabled or uninitialized). Calling more than once is fine.
+ * This is deprecated; pass the number of taps remaining to logPreferenceState.
+ */
+ @Deprecated
+ public static void logPreferenceState() {
+ logPreferenceState(PROMO_TAPS_REMAINING_INVALID);
+ }
+
+ /**
+ * Logs the state of the Contextual Search preference. This function should be called if the
+ * Contextual Search feature is enabled, and will track the different preference settings
+ * (disabled, enabled or uninitialized). Calling more than once is fine.
* @param promoTapsRemaining The number of taps remaining, or -1 if not applicable.
*/
public static void logPreferenceState(int promoTapsRemaining) {
@@ -431,6 +442,16 @@
public static void logPreferenceChange(boolean enabled) {
RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchPreferenceStateChange",
enabled ? PREFERENCE_ENABLED : PREFERENCE_DISABLED, PREFERENCE_HISTOGRAM_BOUNDARY);
+ }
+
+ /**
+ * Logs the outcome of a first run flow.
+ * This is deprecated; call logPromoOutcome instead.
+ */
+ @Deprecated
+ public static void logFirstRunFlowOutcome() {
+ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchFirstRunFlowOutcome",
+ getPreferenceValue(), PREFERENCE_HISTOGRAM_BOUNDARY);
}
/**

Powered by Google App Engine
This is Rietveld 408576698