use of org.chromium.chrome.browser.WarmupManager in project AndroidChromium by JackyAndroid.
the class CustomTabsConnection method preconnectUrls.
private boolean preconnectUrls(List<Bundle> likelyBundles) {
boolean atLeastOneUrl = false;
if (likelyBundles == null)
return false;
WarmupManager warmupManager = WarmupManager.getInstance();
Profile profile = Profile.getLastUsedProfile();
for (Bundle bundle : likelyBundles) {
Uri uri;
try {
uri = IntentUtils.safeGetParcelable(bundle, CustomTabsService.KEY_URL);
} catch (ClassCastException e) {
continue;
}
String url = checkAndConvertUri(uri);
if (url != null) {
warmupManager.maybePreconnectUrlAndSubResources(profile, url);
atLeastOneUrl = true;
}
}
return atLeastOneUrl;
}
Aggregations