Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm

Issue 2772583005: Pass UIImage instead of gfx::Image in ContentSuggestions (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
index 6d5c0700309de111532350438604c0132b6f8f92..b614efb40a889a561ead06893f9e4923550fd8a2 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
@@ -23,7 +23,6 @@
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h"
#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h"
-#include "ui/gfx/image/image.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -269,18 +268,15 @@ SectionIdentifier SectionIdentifierForInfo(
__weak ContentSuggestionsCollectionUpdater* weakSelf = self;
__weak ContentSuggestionsArticleItem* weakArticle = articleItem;
- void (^imageFetchedCallback)(const gfx::Image&) = ^(const gfx::Image& image) {
- if (image.IsEmpty()) {
- return;
- }
+ void (^imageFetchedCallback)(UIImage*) = ^(UIImage* image) {
ContentSuggestionsCollectionUpdater* strongSelf = weakSelf;
ContentSuggestionsArticleItem* strongArticle = weakArticle;
if (!strongSelf || !strongArticle) {
return;
}
- strongArticle.image = image.CopyUIImage();
+ strongArticle.image = image;
[strongSelf.collectionViewController
reconfigureCellsForItems:@[ strongArticle ]
inSectionWithIdentifier:sectionIdentifier];

Powered by Google App Engine
This is Rietveld 408576698