| 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 d2f6398bc491542467fdaba4b85bcbdd4108c018..6b3aab55065ca504f46ef5ac81174675f6066dce 100644
|
| --- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
|
| +++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
|
| @@ -307,12 +307,18 @@ ntp_snippets::ContentSuggestion::ID SuggestionIDForSectionID(
|
|
|
| - (void)fetchImageForSuggestion:
|
| (ContentSuggestionIdentifier*)suggestionIdentifier
|
| - callback:(void (^)(const gfx::Image&))callback {
|
| + callback:(void (^)(UIImage*))callback {
|
| self.contentService->FetchSuggestionImage(
|
| SuggestionIDForSectionID(
|
| [self categoryWrapperForSectionInfo:suggestionIdentifier.sectionInfo],
|
| suggestionIdentifier.IDInSection),
|
| - base::BindBlockArc(callback));
|
| + base::BindBlockArc(^(const gfx::Image& image) {
|
| + if (image.IsEmpty() || !callback) {
|
| + return;
|
| + }
|
| +
|
| + callback([image.ToUIImage() copy]);
|
| + }));
|
| }
|
|
|
| #pragma mark - Private
|
|
|