Commit 11125245 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Replace deprecated getLastUsedProfile function in LayerTitleCache.

|Profile#getLastUsedProfile| is depreciated and replaced with
|Profile#getLastUsedRegularProfile|. This CL updates LayerTitleCache
class.

Note: This change is only code clean-up, does not change any behavior.

Bug: 1041781
Change-Id: I97e6fc0fff2401a8670802b6a20cc8e68b949906
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050488Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740586}
parent cb957965
......@@ -166,8 +166,11 @@ public class LayerTitleCache implements TitleCache {
// Since tab#getProfile() is not available by this time, we will use whatever last used
// profile.
mFaviconHelper.getLocalFaviconImageForURL(Profile.getLastUsedProfile(), tab.getUrlString(),
mFaviconSize, new FaviconImageCallback() {
// TODO (https://crbug.com/1048632): Use the current profile (i.e., regular profile or
// incognito profile) instead of always using regular profile. It works correctly now, but
// it is not safe.
mFaviconHelper.getLocalFaviconImageForURL(Profile.getLastUsedRegularProfile(),
tab.getUrlString(), mFaviconSize, new FaviconImageCallback() {
@Override
public void onFaviconAvailable(Bitmap favicon, String iconUrl) {
updateFaviconFromHistory(tab, favicon);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment