| Index: ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
|
| diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
|
| index 19dbe62a4ee352666e252241b74221e5f525a326..6a83d8f74f1aece6a03afe4b61cbda015bf984a0 100644
|
| --- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
|
| +++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
|
| @@ -234,6 +234,27 @@ initWithContentService:(ntp_snippets::ContentSuggestionsService*)contentService
|
| completion:completion];
|
| }
|
|
|
| +- (void)fetchFaviconImageForSuggestion:(ContentSuggestionIdentifier*)suggestion
|
| + completion:(void (^)(UIImage*))completion {
|
| + if (!completion)
|
| + return;
|
| +
|
| + void (^imageCallback)(const gfx::Image&) = ^(const gfx::Image& image) {
|
| + if (!image.IsEmpty()) {
|
| + completion([image.ToUIImage() copy]);
|
| + }
|
| + };
|
| +
|
| + ntp_snippets::ContentSuggestion::ID identifier =
|
| + ntp_snippets::ContentSuggestion::ID(
|
| + [[self categoryWrapperForSectionInfo:suggestion.sectionInfo]
|
| + category],
|
| + suggestion.IDInSection);
|
| + self.contentService->FetchSuggestionFavicon(
|
| + identifier, /* minimum_size_in_pixel = */ 1, kDefaultFaviconSize,
|
| + base::BindBlockArc(imageCallback));
|
| +}
|
| +
|
| #pragma mark - ContentSuggestionsServiceObserver
|
|
|
| - (void)contentSuggestionsService:
|
|
|