Chromium Code Reviews| 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 71ffec5748bdbff67487ef4a6dfe148b1df8e2f2..791619f6ef82103cbacc5cda9c4329ee71766b27 100644 |
| --- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
| +++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
| @@ -13,6 +13,7 @@ |
| #import "ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h" |
| #import "ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h" |
| #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h" |
| +#import "ios/chrome/browser/ui/content_suggestions/content_suggestion_id.h" |
| #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h" |
| #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_item.h" |
| #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_section_information.h" |
| @@ -56,6 +57,9 @@ ContentSuggestion* ConvertContentSuggestion( |
| suggestion.title = base::SysUTF16ToNSString(contentSuggestion.title()); |
| suggestion.text = base::SysUTF16ToNSString(contentSuggestion.snippet_text()); |
| suggestion.url = contentSuggestion.url(); |
| + suggestion.suggestionID = [[ContentSuggestionID alloc] init]; |
| + suggestion.suggestionID.IDInSection = |
| + contentSuggestion.id().id_within_category(); |
|
lpromero
2017/02/21 10:33:34
Out of curiosity: Here the lingo goes from categor
gambard
2017/02/21 14:37:48
For me it makes sense because this class is making
|
| return suggestion; |
| } |
| @@ -185,7 +189,8 @@ ContentSuggestionsSectionInformation* SectionInformationFromCategoryInfo( |
| for (auto& contentSuggestion : suggestions) { |
| ContentSuggestion* suggestion = ConvertContentSuggestion(contentSuggestion); |
| suggestion.type = TypeForCategory(category); |
| - suggestion.section = self.sectionInformationByCategory[categoryWrapper]; |
| + suggestion.suggestionID.sectionInfo = |
| + self.sectionInformationByCategory[categoryWrapper]; |
| // TODO(crbug.com/686728): fetch the image. |