Chromium Code Reviews| Index: components/favicon/core/favicon_handler.cc |
| diff --git a/components/favicon/core/favicon_handler.cc b/components/favicon/core/favicon_handler.cc |
| index 8f8622d7e79db019d6987d195f6867b0e84605b8..29e73985227f53a0661d347edacf2dc19514eb5e 100644 |
| --- a/components/favicon/core/favicon_handler.cc |
| +++ b/components/favicon/core/favicon_handler.cc |
| @@ -205,7 +205,8 @@ int FaviconHandler::GetIconTypesFromHandlerType( |
| case FaviconDriverObserver::NON_TOUCH_LARGEST: |
| return favicon_base::FAVICON; |
| case FaviconDriverObserver::TOUCH_LARGEST: |
| - return favicon_base::TOUCH_ICON | favicon_base::TOUCH_PRECOMPOSED_ICON; |
| + return favicon_base::TOUCH_ICON | favicon_base::TOUCH_PRECOMPOSED_ICON | |
| + favicon_base::WEB_MANIFEST_ICON; |
| } |
| return 0; |
| } |
| @@ -356,7 +357,7 @@ void FaviconHandler::OnUpdateCandidates( |
| // See if there is a cached favicon for the manifest. This will update the DB |
| // mappings only if the manifest URL is cached. |
| GetFaviconAndUpdateMappingsUnlessIncognito( |
| - /*icon_url=*/manifest_url_, favicon_base::FAVICON, |
| + /*icon_url=*/manifest_url_, favicon_base::WEB_MANIFEST_ICON, |
| base::Bind(&FaviconHandler::OnFaviconDataForManifestFromFaviconService, |
| base::Unretained(this))); |
| } |
| @@ -374,8 +375,9 @@ void FaviconHandler::OnFaviconDataForManifestFromFaviconService( |
| !has_valid_result || HasExpiredOrIncompleteResult(preferred_icon_size(), |
| favicon_bitmap_results); |
| - if (has_valid_result && (notification_icon_url_ != manifest_url_ || |
| - notification_icon_type_ != favicon_base::FAVICON)) { |
| + if (has_valid_result && |
| + (notification_icon_url_ != manifest_url_ || |
| + notification_icon_type_ != favicon_base::WEB_MANIFEST_ICON)) { |
| // There is a valid favicon. Notify any observers. It is useful to notify |
| // the observers even if the favicon is expired or incomplete (incorrect |
| // size) because temporarily showing the user an expired favicon or |
| @@ -526,7 +528,9 @@ void FaviconHandler::OnDidDownloadFavicon( |
| // manifest URL, if available, is used instead of the icon URL. |
| SetFavicon(manifest_url_.is_empty() ? best_favicon_.candidate.icon_url |
| : manifest_url_, |
| - best_favicon_.image, best_favicon_.candidate.icon_type); |
| + best_favicon_.image, |
| + manifest_url_.is_empty() ? best_favicon_.candidate.icon_type |
| + : favicon_base::WEB_MANIFEST_ICON); |
|
pkotwicz
2017/05/24 14:27:44
You need to update HistoryBackend::SetFaviconMappi
mastiz
2017/05/25 11:14:16
Done.
|
| } |
| // Clear download related state. |
| current_candidate_index_ = candidates_.size(); |