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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java

Issue 2917053004: customtabs: Load the SharedPreferences only once, in the background. (Closed)
Patch Set: Please FindBugs. Created 3 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/RequestThrottler.java » ('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/customtabs/CustomTabsConnection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
index 0caac7e5c9188b3a15bcb983f685df6eb3c95b96..abaf00b0992b81759bd0696bf07b42b902a74fcd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
@@ -267,7 +267,6 @@ public class CustomTabsConnection {
if (!isCallerForegroundOrSelf()) return false;
mClientManager.recordUidHasCalledWarmup(Binder.getCallingUid());
final boolean initialized = !mWarmupHasBeenCalled.compareAndSet(false, true);
- final int uid = Binder.getCallingUid();
// The call is non-blocking and this must execute on the UI thread, post a task.
ThreadUtils.postOnUiThread(new Runnable() {
@Override
@@ -299,7 +298,7 @@ public class CustomTabsConnection {
// The throttling database uses shared preferences, that can cause a
// StrictMode violation on the first access. Make sure that this access is
// not in mayLauchUrl.
- RequestThrottler.getForUid(mApplication, uid);
+ RequestThrottler.loadInBackground(mApplication);
}
} finally {
TraceEvent.end("CustomTabsConnection.warmupInternal");
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/customtabs/RequestThrottler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698