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

Unified Diff: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.mm

Issue 2877513003: ContentSuggestionsDataSource returns CollectionViewItem (Closed)
Patch Set: Address comments Created 3 years, 7 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/cells/content_suggestions_item.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.mm b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.mm
index ffa77783fd2e258197fee48f4b17510300ee38d7..985d5828e83410ff73049671b6e7b1c72390579f 100644
--- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.mm
+++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.mm
@@ -6,6 +6,7 @@
#include "base/time/time.h"
#import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
+#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
#import "ios/chrome/browser/ui/favicon/favicon_attributes.h"
#import "ios/chrome/browser/ui/favicon/favicon_view.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
@@ -74,7 +75,6 @@ const CGFloat kAnimationDuration = 0.3;
- (instancetype)initWithType:(NSInteger)type
title:(NSString*)title
subtitle:(NSString*)subtitle
- delegate:(id<ContentSuggestionsItemDelegate>)delegate
url:(const GURL&)url {
self = [super initWithType:type];
if (self) {
@@ -82,7 +82,6 @@ const CGFloat kAnimationDuration = 0.3;
_title = [title copy];
_subtitle = [subtitle copy];
_URL = url;
- _delegate = delegate;
}
return self;
}
@@ -92,7 +91,7 @@ const CGFloat kAnimationDuration = 0.3;
if (self.hasImage && !self.imageFetched) {
self.imageFetched = YES;
// Fetch the image. During the fetch the cell's image should still be set.
- [self.delegate loadImageForSuggestionItem:self];
+ [self.delegate loadImageForSuggestedItem:self];
}
[cell.faviconView configureWithAttributes:self.attributes];
cell.titleLabel.text = self.title;

Powered by Google App Engine
This is Rietveld 408576698