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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java

Issue 2848333002: Add and update prefs for search engine promo (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | chrome/browser/android/chrome_feature_list.cc » ('j') | 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/locale/LocaleManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java b/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
index f16cb9e07e1e3a5eb67c23bb5ce0bebc722b1f11..a3f3eaac736fc15c07f040695822c89d683de249 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java
@@ -35,6 +35,15 @@ public class LocaleManager {
public static final String PREF_WAS_IN_SPECIAL_LOCALE = "LocaleManager_WAS_IN_SPECIAL_LOCALE";
public static final String SPECIAL_LOCALE_ID = "US";
+ /** The current state regarding search engine promo dialogs. */
+ @IntDef({SEARCH_ENGINE_PROMO_SHOULD_CHECK, SEARCH_ENGINE_PROMO_CHECKED_NOT_SHOWN,
+ SEARCH_ENGINE_PROMO_CHECKED_AND_SHOWN})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface SearchEnginePromoState {}
+ public static final int SEARCH_ENGINE_PROMO_SHOULD_CHECK = -1;
+ public static final int SEARCH_ENGINE_PROMO_CHECKED_NOT_SHOWN = 0;
+ public static final int SEARCH_ENGINE_PROMO_CHECKED_AND_SHOWN = 1;
+
/** The different types of search engine promo dialogs. */
@IntDef({SEARCH_ENGINE_PROMO_DONT_SHOW, SEARCH_ENGINE_PROMO_SHOW_SOGOU,
SEARCH_ENGINE_PROMO_SHOW_EXISTING, SEARCH_ENGINE_PROMO_SHOW_NEW})
@@ -46,6 +55,9 @@ public class LocaleManager {
public static final int SEARCH_ENGINE_PROMO_SHOW_EXISTING = 1;
public static final int SEARCH_ENGINE_PROMO_SHOW_NEW = 2;
+ protected static final String KEY_SEARCH_ENGINE_PROMO_SHOW_STATE =
+ "com.android.chrome.SEARCH_ENGINE_PROMO_SHOWN";
+
private static final int SNACKBAR_DURATION_MS = 6000;
private static LocaleManager sInstance;
« no previous file with comments | « no previous file | chrome/browser/android/chrome_feature_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698