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

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

Issue 1337703002: [Contextual Search] Add support for crushed sprites and animate the search provider icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Very small changes from last pedrosimonneti@ review Created 5 years, 2 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/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 1cb1a0e9ec803a271defc847f909e988f8dc16f8..014ceec1c02c01134587256c18c59e24be886f51 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
@@ -35,6 +35,8 @@ public class ChromePreferenceManager {
private static final String CONTEXTUAL_SEARCH_TAP_COUNT = "contextual_search_tap_count";
private static final String CONTEXTUAL_SEARCH_PEEK_PROMO_SHOW_COUNT =
"contextual_search_peek_promo_show_count";
+ private static final String CONTEXTUAL_SEARCH_LAST_ANIMATION_TIME =
+ "contextual_search_last_animation_time";
private static final String ENABLE_CUSTOM_TABS = "enable_custom_tabs";
private static final int SIGNIN_PROMO_CYCLE_IN_DAYS = 120;
@@ -251,6 +253,23 @@ public class ChromePreferenceManager {
}
/**
+ * @return The last time the search provider icon was animated on tap.
+ */
+ public long getContextualSearchLastAnimationTime() {
+ return mSharedPreferences.getLong(CONTEXTUAL_SEARCH_LAST_ANIMATION_TIME, 0);
+ }
+
+ /**
+ * Sets the last time the search provider icon was animated on tap.
+ * @param time The last time the search provider icon was animated on tap.
+ */
+ public void setContextualSearchLastAnimationTime(long time) {
+ SharedPreferences.Editor ed = mSharedPreferences.edit();
+ ed.putLong(CONTEXTUAL_SEARCH_LAST_ANIMATION_TIME, time);
+ ed.apply();
+ }
+
+ /**
* @return Number of times the promo was triggered to peek by a tap gesture, or a negative value
* if in the disabled state.
*/

Powered by Google App Engine
This is Rietveld 408576698