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

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

Issue 1417733008: Java code for fetching variations first run seed after receiving chrome.TOS_ACKED broadcast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary exception throw declaration Created 5 years, 1 month 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/AndroidManifest.xml ('k') | chrome/browser/android/chrome_jni_registrar.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/preferences/PrefServiceBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index df3d8bb8bcfcaab9379d567d21321cd5df2c0294..c5c1564f934cc2c01e0cd420b0881b04861c3966 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -7,7 +7,6 @@ package org.chromium.chrome.browser.preferences;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
-import android.util.Base64;
import android.util.Log;
import org.chromium.base.ThreadUtils;
@@ -220,45 +219,6 @@ public final class PrefServiceBridge {
}
}
- // TODO(agulenko): Move this piece of code to a separate class.
-
- private static final String VARIATIONS_FIRST_RUN_SEED_BASE64 = "variations_seed_base64";
- private static final String VARIATIONS_FIRST_RUN_SEED_SIGNATURE = "variations_seed_signature";
- private static final String VARIATIONS_FIRST_RUN_SEED_COUNTRY = "variations_seed_country";
-
- private static String getVariationsFirstRunSeedPref(Context context, String prefName) {
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
- return prefs.getString(prefName, "");
- }
-
- public static void setVariationsFirstRunSeed(
- Context context, byte[] rawSeed, String signature, String country) {
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
- prefs.edit()
- .putString(VARIATIONS_FIRST_RUN_SEED_BASE64,
- Base64.encodeToString(rawSeed, Base64.NO_WRAP))
- .putString(VARIATIONS_FIRST_RUN_SEED_SIGNATURE, signature)
- .putString(VARIATIONS_FIRST_RUN_SEED_COUNTRY, country)
- .apply();
- }
-
- @CalledByNative
- private static byte[] getVariationsFirstRunSeedData(Context context) {
- return Base64.decode(
- getVariationsFirstRunSeedPref(context, VARIATIONS_FIRST_RUN_SEED_BASE64),
- Base64.NO_WRAP);
- }
-
- @CalledByNative
- private static String getVariationsFirstRunSeedSignature(Context context) {
- return getVariationsFirstRunSeedPref(context, VARIATIONS_FIRST_RUN_SEED_SIGNATURE);
- }
-
- @CalledByNative
- private static String getVariationsFirstRunSeedCountry(Context context) {
- return getVariationsFirstRunSeedPref(context, VARIATIONS_FIRST_RUN_SEED_COUNTRY);
- }
-
public boolean isAcceptCookiesEnabled() {
return nativeGetAcceptCookiesEnabled();
}
« no previous file with comments | « chrome/android/java/AndroidManifest.xml ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698