| Index: components/favicon/ios/web_favicon_driver.mm
|
| diff --git a/components/favicon/ios/web_favicon_driver.mm b/components/favicon/ios/web_favicon_driver.mm
|
| index 9e1b7e3dc00e51c30d9be6a3f8228c1d4bd30a8b..534c7b7f6637889552f42154b20f14a9eeef27c4 100644
|
| --- a/components/favicon/ios/web_favicon_driver.mm
|
| +++ b/components/favicon/ios/web_favicon_driver.mm
|
| @@ -55,18 +55,6 @@ gfx::Image WebFaviconDriver::GetFavicon() const {
|
| return item ? item->GetFavicon().image : gfx::Image();
|
| }
|
|
|
| -bool WebFaviconDriver::FaviconIsValid() const {
|
| - web::NavigationItem* item =
|
| - web_state()->GetNavigationManager()->GetLastCommittedItem();
|
| - return item ? item->GetFavicon().valid : false;
|
| -}
|
| -
|
| -GURL WebFaviconDriver::GetActiveURL() {
|
| - web::NavigationItem* item =
|
| - web_state()->GetNavigationManager()->GetVisibleItem();
|
| - return item ? item->GetURL() : GURL();
|
| -}
|
| -
|
| int WebFaviconDriver::DownloadImage(const GURL& url,
|
| int max_image_size,
|
| ImageDownloadCallback callback) {
|
| @@ -131,7 +119,10 @@ WebFaviconDriver::WebFaviconDriver(web::WebState* web_state,
|
| history::HistoryService* history_service,
|
| bookmarks::BookmarkModel* bookmark_model)
|
| : web::WebStateObserver(web_state),
|
| - FaviconDriverImpl(favicon_service, history_service, bookmark_model),
|
| + FaviconDriverImpl(/*enable_touch_icons=*/true,
|
| + favicon_service,
|
| + history_service,
|
| + bookmark_model),
|
| image_fetcher_(web_state->GetBrowserState()->GetRequestContext(),
|
| web::WebThread::GetBlockingPool()) {}
|
|
|
| @@ -141,7 +132,12 @@ WebFaviconDriver::~WebFaviconDriver() {
|
| void WebFaviconDriver::FaviconUrlUpdated(
|
| const std::vector<web::FaviconURL>& candidates) {
|
| DCHECK(!candidates.empty());
|
| - OnUpdateFaviconURL(GetActiveURL(), FaviconURLsFromWebFaviconURLs(candidates));
|
| +
|
| + web::NavigationItem* item =
|
| + web_state()->GetNavigationManager()->GetVisibleItem();
|
| +
|
| + OnUpdateFaviconURL(item ? item->GetURL() : GURL(),
|
| + FaviconURLsFromWebFaviconURLs(candidates));
|
| }
|
|
|
| } // namespace favicon
|
|
|