Chromium Code Reviews| Index: components/favicon/core/large_icon_service.cc |
| diff --git a/components/favicon/core/large_icon_service.cc b/components/favicon/core/large_icon_service.cc |
| index 8920f7c49631db6cefd1240e1bfe3ef6a50accaf..75a9dd8cc516ae074fb8f078c345dda25c85e365 100644 |
| --- a/components/favicon/core/large_icon_service.cc |
| +++ b/components/favicon/core/large_icon_service.cc |
| @@ -385,12 +385,14 @@ LargeIconService::GetLargeIconOrFallbackStyleImpl( |
| min_source_size_in_pixel, desired_size_in_pixel, raw_bitmap_callback, |
| image_callback, background_task_runner_, tracker); |
| + int max_size_in_pixel = |
| + std::max(desired_size_in_pixel, min_source_size_in_pixel); |
| // TODO(beaudoin): For now this is just a wrapper around |
| // GetLargestRawFaviconForPageURL. Add the logic required to select the best |
| // possible large icon. Also add logic to fetch-on-demand when the URL of |
| // a large icon is known but its bitmap is not available. |
| return favicon_service_->GetLargestRawFaviconForPageURL( |
| - page_url, large_icon_types_, min_source_size_in_pixel, |
| + page_url, large_icon_types_, max_size_in_pixel, |
|
jkrcal
2017/05/18 12:33:55
nit: I do not like the naming. Passing in a max_si
gambard
2017/05/18 13:43:59
I don't like changing the value of arguments. but
jkrcal
2017/05/18 13:50:59
I see. ideal is better to me than max. Maybe size_
|
| base::Bind(&LargeIconWorker::OnIconLookupComplete, worker), tracker); |
| } |