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

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: Changes from self-review Created 5 years, 3 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 1a08c588aa9d30bd6650c81f0db1ce6d4225c91e..4cd451f3bc09dec97ff951f1b488ca4b86750a9f 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
@@ -33,6 +33,8 @@ public class ChromePreferenceManager {
private static final String CONTEXTUAL_SEARCH_TAP_TRIGGERED_PROMO_COUNT =
"contextual_search_tap_triggered_promo_count";
private static final String CONTEXTUAL_SEARCH_TAP_COUNT = "contextual_search_tap_count";
+ private static final String CONTEXTUAL_SEARCH_LAST_ANIMATION_ON_TAP_TIME =
newt (away) 2015/09/25 01:21:27 I'd rename these to be consistent with the method
Theresa 2015/09/25 01:52:08 Done.
+ "contextual_search_last_animation_on_tap_time";
private static final String ENABLE_CUSTOM_TABS = "enable_custom_tabs";
private static final int SIGNIN_PROMO_CYCLE_IN_DAYS = 120;
@@ -234,6 +236,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_ON_TAP_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_ON_TAP_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