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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/identity/UuidBasedUniqueIdentificationGenerator.java

Issue 1874423002: 🍰 Migrate app shared preferences to ContextUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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/identity/UuidBasedUniqueIdentificationGenerator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity/UuidBasedUniqueIdentificationGenerator.java b/chrome/android/java/src/org/chromium/chrome/browser/identity/UuidBasedUniqueIdentificationGenerator.java
index 013c5e7ae97cd279a1def7b2cfa1e475bea1ae17..817f81364ba8f13fb56b14293b747dd571781d75 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/identity/UuidBasedUniqueIdentificationGenerator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/identity/UuidBasedUniqueIdentificationGenerator.java
@@ -6,8 +6,8 @@ package org.chromium.chrome.browser.identity;
import android.content.Context;
import android.content.SharedPreferences;
-import android.preference.PreferenceManager;
+import org.chromium.base.ContextUtils;
import org.chromium.base.VisibleForTesting;
import java.util.UUID;
@@ -29,8 +29,7 @@ public class UuidBasedUniqueIdentificationGenerator implements UniqueIdentificat
@Override
public String getUniqueId(@Nullable String salt) {
- SharedPreferences preferences = PreferenceManager
- .getDefaultSharedPreferences(mContext);
+ SharedPreferences preferences = ContextUtils.getAppSharedPreferences();
String storedUniqueId = preferences.getString(mPreferenceKey, null);
if (storedUniqueId != null) {
return storedUniqueId;

Powered by Google App Engine
This is Rietveld 408576698