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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java

Issue 2099753003: [TTS] Update Tap counters to compensate for Quick Answers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just added a comment. Created 4 years, 6 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
index 09c7223c0f106f8bca593adad6b0c059e7025897..fc68ac4cc408e84b29d6c10fabeb82e5f0d211db 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
@@ -36,6 +36,8 @@ public class ChromePreferenceManager {
"contextual_search_peek_promo_show_count";
private static final String CONTEXTUAL_SEARCH_LAST_ANIMATION_TIME =
"contextual_search_last_animation_time";
+ private static final String CONTEXTUAL_SEARCH_TAP_QUICK_ANSWER_COUNT =
+ "contextual_search_tap_quick_answer_count";
private static final String HERB_FLAVOR_KEY = "herb_flavor";
private static final String APP_LINK_KEY = "applink.app_link_enabled";
private static final String CHROME_DEFAULT_BROWSER = "applink.chrome_default_browser";
@@ -268,21 +270,41 @@ public class ChromePreferenceManager {
}
/**
- * @return Number of tap gestures that have been received when not waiting for the promo.
+ * @return Number of tap gestures that have been received since the last time the panel was
+ * opened.
*/
public int getContextualSearchTapCount() {
return mSharedPreferences.getInt(CONTEXTUAL_SEARCH_TAP_COUNT, 0);
}
/**
- * Sets the number of tap gestures that have been received when not waiting for the promo.
- * @param count Number of taps that have been received when not waiting for the promo.
+ * Sets the number of tap gestures that have been received since the last time the panel was
+ * opened.
+ * @param count Number of taps that have been received since the last time the panel was opened.
*/
public void setContextualSearchTapCount(int count) {
writeInt(CONTEXTUAL_SEARCH_TAP_COUNT, count);
}
/**
+ * @return Number of Tap triggered Quick Answers (that "do answer") that have been shown since
+ * the last time the panel was opened.
+ */
+ public int getContextualSearchTapQuickAnswerCount() {
+ return mSharedPreferences.getInt(CONTEXTUAL_SEARCH_TAP_QUICK_ANSWER_COUNT, 0);
+ }
+
+ /**
+ * Sets the number of tap triggered Quick Answers (that "do answer") that have been shown since
+ * the last time the panel was opened.
+ * @param count Number of Tap triggered Quick Answers (that "do answer") that have been shown
+ * since the last time the panel was opened.
+ */
+ public void setContextualSearchTapQuickAnswerCount(int count) {
+ writeInt(CONTEXTUAL_SEARCH_TAP_QUICK_ANSWER_COUNT, count);
+ }
+
+ /**
* @return Which UI prototype the user is testing. This is cached from native via
* {@link FeatureUtilities#cacheHerbFlavor}.
*/
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698