Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| index e713649a92df4587fcf5f86ffd5dd75b156055db..535abd30c169234afcc0e17f4cf515752f8b4131 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| @@ -5,10 +5,7 @@ |
| package org.chromium.chrome.browser; |
| import android.content.Context; |
| -import android.content.Intent; |
| import android.content.SharedPreferences; |
| -import android.content.pm.ResolveInfo; |
| -import android.net.Uri; |
| import android.os.AsyncTask; |
| import android.os.Looper; |
| import android.os.MessageQueue; |
| @@ -283,7 +280,9 @@ public class DeferredStartupHandler { |
| removeSnapshotDatabase(); |
| - cacheIsChromeDefaultBrowser(); |
| + DefaultBrowserInfo.cacheIsChromeDefaultBrowser(); |
| + |
| + DefaultBrowserInfo.initBrowserFetcher(); |
|
Maria
2017/02/17 23:01:23
should this be called from UI thread rather than f
ltian
2017/02/21 19:15:37
Done.
|
| // Warm up all web app shared prefs. This must be run after the WebappRegistry |
| // instance is initialized. |
| @@ -320,20 +319,6 @@ public class DeferredStartupHandler { |
| } |
| /** |
| - * Caches whether Chrome is set as a default browser on the device. |
| - */ |
| - @WorkerThread |
| - private void cacheIsChromeDefaultBrowser() { |
| - // Retrieve whether Chrome is default in background to avoid strict mode checks. |
| - Intent intent = new Intent(Intent.ACTION_VIEW, |
| - Uri.parse("http://www.madeupdomainforcheck123.com/")); |
| - ResolveInfo info = mAppContext.getPackageManager().resolveActivity(intent, 0); |
| - boolean isDefault = (info != null && info.match != 0 |
| - && mAppContext.getPackageName().equals(info.activityInfo.packageName)); |
| - ChromePreferenceManager.getInstance().setCachedChromeDefaultBrowser(isDefault); |
| - } |
| - |
| - /** |
| * Deletes the snapshot database which is no longer used because the feature has been removed |
| * in Chrome M41. |
| */ |