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 f9ed02e30fc690818d4f1c6b6cb78b973e29daab..44e05aade968a6fd039c9e9271509ff6a934b8d9 100644 |
--- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
+++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
@@ -302,12 +302,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.CopyUIImage()); |
stkhapugin
2017/03/24 16:31:40
This returns a retained UIImage. You need to use i
gambard
2017/03/28 07:22:28
Done.
|
+ })); |
} |
#pragma mark - Private |