Chromium Code Reviews| Index: chrome/browser/win/jumplist.cc |
| diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc |
| index 508093dfa290fa460552fa29d95bdf17c8b071eb..c1370b4e0ed96fd9db490c50e7bcc97ab314eab1 100644 |
| --- a/chrome/browser/win/jumplist.cc |
| +++ b/chrome/browser/win/jumplist.cc |
| @@ -522,14 +522,14 @@ void JumpList::StartLoadingFavicon() { |
| favicon::FaviconService* favicon_service = |
| FaviconServiceFactory::GetForProfile(profile_, |
| ServiceAccessType::EXPLICIT_ACCESS); |
| - task_id_ = favicon_service->GetFaviconImageForPageURL( |
| - url, |
| + task_id_ = favicon_service->GetRawFaviconForPageURL( |
| + url, favicon_base::FAVICON, 0, |
|
sky
2017/01/30 23:56:11
Supplying 0 for a size may result in a large sized
chengx
2017/01/31 00:39:38
The original API, i.e., GetFaviconImageForPageURL,
|
| base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)), |
| &cancelable_task_tracker_); |
| } |
| void JumpList::OnFaviconDataAvailable( |
| - const favicon_base::FaviconImageResult& image_result) { |
| + const favicon_base::FaviconRawBitmapResult& image_result) { |
| DCHECK(CalledOnValidThread()); |
| // If there is currently a favicon request in progress, it is now outdated, |
| @@ -541,10 +541,11 @@ void JumpList::OnFaviconDataAvailable( |
| base::AutoLock auto_lock(data->list_lock_); |
| // Attach the received data to the ShellLinkItem object. |
| // This data will be decoded by the RunUpdateOnFileThread method. |
| - if (!image_result.image.IsEmpty()) { |
| + if (image_result.is_valid()) { |
| if (!data->icon_urls_.empty() && data->icon_urls_.front().second.get()) |
| data->icon_urls_.front().second->set_icon_data( |
| - image_result.image.AsBitmap()); |
| + gfx::Image::CreateFrom1xPNGBytes(image_result.bitmap_data) |
|
grt (UTC plus 2)
2017/01/30 10:02:40
Is it necessarily the case that the favicon bitmap
chengx
2017/01/31 00:39:38
Sure.
|
| + .AsBitmap()); |
| } |
| if (!data->icon_urls_.empty()) |