| Index: components/favicon/core/favicon_handler.cc
|
| diff --git a/components/favicon/core/favicon_handler.cc b/components/favicon/core/favicon_handler.cc
|
| index aa57bfcd22f5e82542c6d7702766416ef0b69923..c94b6268cf54fa5a4c07c014380e1adcb0d02e6e 100644
|
| --- a/components/favicon/core/favicon_handler.cc
|
| +++ b/components/favicon/core/favicon_handler.cc
|
| @@ -347,7 +347,8 @@ void FaviconHandler::OnUpdateCandidates(
|
|
|
| // If no manifest available, proceed with the regular candidates only.
|
| if (manifest_url_.is_empty()) {
|
| - OnGotFinalIconURLCandidates(candidates);
|
| + OnGotFinalIconURLCandidates(candidates,
|
| + GetDesiredPixelSizes(handler_type_));
|
| return;
|
| }
|
|
|
| @@ -396,7 +397,9 @@ void FaviconHandler::OnDidDownloadManifest(
|
| manifest_download_request_.Cancel();
|
|
|
| if (!candidates.empty()) {
|
| - OnGotFinalIconURLCandidates(candidates);
|
| + // When reading icons from web manifests, prefer kNonTouchLargestIconSize.
|
| + OnGotFinalIconURLCandidates(candidates,
|
| + std::vector<int>(1U, kNonTouchLargestIconSize));
|
| return;
|
| }
|
|
|
| @@ -409,14 +412,14 @@ void FaviconHandler::OnDidDownloadManifest(
|
| service_->UnableToDownloadFavicon(manifest_url_);
|
| manifest_url_ = GURL();
|
|
|
| - OnGotFinalIconURLCandidates(non_manifest_original_candidates_);
|
| + OnGotFinalIconURLCandidates(non_manifest_original_candidates_,
|
| + GetDesiredPixelSizes(handler_type_));
|
| }
|
|
|
| void FaviconHandler::OnGotFinalIconURLCandidates(
|
| - const std::vector<FaviconURL>& candidates) {
|
| + const std::vector<FaviconURL>& candidates,
|
| + const std::vector<int>& desired_pixel_sizes) {
|
| std::vector<FaviconCandidate> sorted_candidates;
|
| - const std::vector<int> desired_pixel_sizes =
|
| - GetDesiredPixelSizes(handler_type_);
|
| for (const FaviconURL& candidate : candidates) {
|
| if (!candidate.icon_url.is_empty() && (candidate.icon_type & icon_types_)) {
|
| sorted_candidates.push_back(
|
|
|