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

Replace deprecated getLastUsedProfile function in

NavigationSheetMediator.

|Profile#getLastUsedProfile| is deprecated and replaced with
|Profile#getLastUsedRegularProfile|. This CL updates
NavigationSheetMediator class.

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

Bug: 1041781
Change-Id: I31ea8e441ae9877c5c26e3643a35f1b465ff9dd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050493Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740633}
parent 6fb2fdee
......@@ -109,8 +109,11 @@ class NavigationSheetMediator {
FaviconHelper.FaviconImageCallback imageCallback =
(bitmap, iconUrl) -> onFaviconAvailable(pageUrl, bitmap);
if (!pageUrl.equals(UrlConstants.HISTORY_URL)) {
mFaviconHelper.getLocalFaviconImageForURL(
Profile.getLastUsedProfile(), pageUrl, mFaviconSize, imageCallback);
// 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(),
pageUrl, mFaviconSize, imageCallback);
requestedUrls.add(pageUrl);
} else {
mModelList.get(i).model.set(ItemProperties.ICON, mHistoryIcon);
......
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