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

Unified Diff: ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm

Issue 2673003002: [Reading List] Display the redirected URL's favicon. (Closed)
Patch Set: Created 3 years, 10 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/reading_list/reading_list_collection_view_item.mm
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm b/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
index e13cc2fa119d8cc74d885070c07d45e34146067e..46931b36ecc4795ff918052316df8cc3c457f944 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
+++ b/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
@@ -64,6 +64,7 @@ const CGFloat kDistillationIndicatorSize = 18;
@synthesize text = _text;
@synthesize detailText = _detailText;
@synthesize url = _url;
+@synthesize faviconPageURL = _faviconPageURL;
@synthesize displayedCell = _displayedCell;
@synthesize distillationState = _distillationState;
@@ -78,22 +79,27 @@ const CGFloat kDistillationIndicatorSize = 18;
_faviconAttributesProvider = provider;
_url = url;
_distillationState = state;
+ return self;
+}
+
+- (void)setFaviconPageURL:(GURL)url {
+ _faviconPageURL = url;
// |self| owns |provider|, |provider| owns the block, so a week self reference
// is necessary.
__weak ReadingListCollectionViewItem* weakSelf = self;
- [provider
+ [_faviconAttributesProvider
fetchFaviconAttributesForURL:url
completion:^(FaviconAttributes* _Nonnull attributes) {
ReadingListCollectionViewItem* strongSelf = weakSelf;
if (!strongSelf) {
return;
}
+
strongSelf.attributes = attributes;
+
[strongSelf.displayedCell.faviconView
- configureWithAttributes:attributes];
+ configureWithAttributes:strongSelf.attributes];
}];
-
- return self;
}
#pragma mark - property

Powered by Google App Engine
This is Rietveld 408576698