| 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 581ec0b986ee96fb257b93d63527c99f75e77fbe..1919acab93e47cf98d60ef40c4b6022f8b5a0311 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
|
| @@ -44,11 +44,13 @@ typedef NS_ENUM(NSInteger, ItemType) {
|
| ItemTypeHeader,
|
| ItemTypeEmpty,
|
| ItemTypeReadingList,
|
| + ItemTypeMostVisited,
|
| };
|
|
|
| typedef NS_ENUM(NSInteger, SectionIdentifier) {
|
| SectionIdentifierArticles = kSectionIdentifierEnumZero,
|
| SectionIdentifierReadingList,
|
| + SectionIdentifierMostVisited,
|
| SectionIdentifierDefault,
|
| };
|
|
|
| @@ -61,6 +63,8 @@ ItemType ItemTypeForContentSuggestionType(ContentSuggestionType type) {
|
| return ItemTypeEmpty;
|
| case ContentSuggestionTypeReadingList:
|
| return ItemTypeReadingList;
|
| + case ContentSuggestionTypeMostVisited:
|
| + return ItemTypeMostVisited;
|
| }
|
| }
|
|
|
| @@ -71,6 +75,8 @@ ContentSuggestionType ContentSuggestionTypeForItemType(NSInteger type) {
|
| return ContentSuggestionTypeEmpty;
|
| if (type == ItemTypeReadingList)
|
| return ContentSuggestionTypeReadingList;
|
| + if (type == ItemTypeMostVisited)
|
| + return ContentSuggestionTypeMostVisited;
|
| // Add new type here
|
|
|
| // Default type.
|
| @@ -87,6 +93,9 @@ SectionIdentifier SectionIdentifierForInfo(
|
| case ContentSuggestionsSectionReadingList:
|
| return SectionIdentifierReadingList;
|
|
|
| + case ContentSuggestionsSectionMostVisited:
|
| + return SectionIdentifierMostVisited;
|
| +
|
| case ContentSuggestionsSectionUnknown:
|
| return SectionIdentifierDefault;
|
| }
|
| @@ -199,6 +208,14 @@ SectionIdentifier SectionIdentifierForInfo(
|
| [self.collectionViewController dismissSection:section];
|
| }
|
|
|
| +- (void)reloadSection:(ContentSuggestionsSectionInformation*)sectionInfo {
|
| + // TODO(crbug.com/707754): implement this method.
|
| +}
|
| +
|
| +- (void)faviconAvailableForURL:(const GURL&)URL {
|
| + // TODO(crbug.com/707754): implement this method.
|
| +}
|
| +
|
| #pragma mark - Public methods
|
|
|
| - (BOOL)shouldUseCustomStyleForSection:(NSInteger)section {
|
| @@ -278,6 +295,10 @@ SectionIdentifier SectionIdentifierForInfo(
|
| [indexPaths addObject:addedIndexPath];
|
| break;
|
| }
|
| + case ContentSuggestionTypeMostVisited: {
|
| + // TODO(crbug.com/707754): Add the most visited item.
|
| + break;
|
| + }
|
| }
|
| }
|
|
|
|
|