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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabIdManager.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/tab/TabIdManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabIdManager.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabIdManager.java
index 4ccdf7cef0c3062dfc1bfef78c219a9814457463..61a0e5d2efb5601ef5e72863c6c00eff37904305 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabIdManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabIdManager.java
@@ -6,9 +6,9 @@ package org.chromium.chrome.browser.tab;
import android.content.Context;
import android.content.SharedPreferences;
-import android.preference.PreferenceManager;
import org.chromium.base.ApplicationStatus;
+import org.chromium.base.ContextUtils;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.tabmodel.TabModel;
@@ -92,7 +92,7 @@ public class TabIdManager {
// Read the shared preference. This has to be done on the critical path to ensure that the
// myriad Activities that serve as entries into Chrome are all synchronized on the correct
// maximum Tab ID.
- mPreferences = PreferenceManager.getDefaultSharedPreferences(mContext);
+ mPreferences = ContextUtils.getAppSharedPreferences();
mIdCounter.set(mPreferences.getInt(PREF_NEXT_ID, 0));
}
}

Powered by Google App Engine
This is Rietveld 408576698