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

Unified Diff: components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java

Issue 1462953004: Unit tests for importing prefs from the Java side implemented (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test check if prefs are actually empty after calling ClearJavaFirstRunPrefs() function 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
Index: components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
index 2b5a5bed5d4c5447b915c9322a1f0259dd836818..cf64927c241a60b747fd5540a981c8f1a8ae0379 100644
--- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
@@ -16,20 +16,20 @@ import org.chromium.base.annotations.CalledByNative;
* in SharedPreferences and to get the seed from there. To store raw seed data class serializes
* byte[] to Base64 encoded string and decodes this string before passing to C++ side.
*/
-public final class VariationsSeedBridge {
- 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 final String VARIATIONS_FIRST_RUN_SEED_DATE = "variations_seed_date";
- private static final String VARIATIONS_FIRST_RUN_SEED_IS_GZIP_COMPRESSED =
+public class VariationsSeedBridge {
+ protected static final String VARIATIONS_FIRST_RUN_SEED_BASE64 = "variations_seed_base64";
+ protected static final String VARIATIONS_FIRST_RUN_SEED_SIGNATURE = "variations_seed_signature";
+ protected static final String VARIATIONS_FIRST_RUN_SEED_COUNTRY = "variations_seed_country";
+ protected static final String VARIATIONS_FIRST_RUN_SEED_DATE = "variations_seed_date";
+ protected static final String VARIATIONS_FIRST_RUN_SEED_IS_GZIP_COMPRESSED =
"variations_seed_is_gzip_compressed";
// This pref is used to store information about successful seed storing on the C++ side, in
// order to not fetch the seed again.
- private static final String VARIATIONS_FIRST_RUN_SEED_NATIVE_STORED =
+ protected static final String VARIATIONS_FIRST_RUN_SEED_NATIVE_STORED =
"variations_seed_native_stored";
- private static String getVariationsFirstRunSeedPref(Context context, String prefName) {
+ protected static String getVariationsFirstRunSeedPref(Context context, String prefName) {
return PreferenceManager.getDefaultSharedPreferences(context).getString(prefName, "");
}

Powered by Google App Engine
This is Rietveld 408576698