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

Unified Diff: ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm

Issue 2739873003: Remove suggestions notified as invalid (Closed)
Patch Set: Update comment 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/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 52b7c7caca1b39dc294f10938fbf5f2cdd9aeb37..9c99ee7144b28d9f980ba71e1cd9c1c673cf7db1 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
+++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
@@ -198,9 +198,17 @@ ntp_snippets::ContentSuggestion::ID SuggestionIDForSectionID(
- (void)contentSuggestionsService:
(ntp_snippets::ContentSuggestionsService*)suggestionsService
- SuggestionInvalidated:
+ suggestionInvalidated:
(const ntp_snippets::ContentSuggestion::ID&)suggestion_id {
- // Update dataSink.
+ ContentSuggestionsCategoryWrapper* wrapper =
+ [[ContentSuggestionsCategoryWrapper alloc]
+ initWithCategory:suggestion_id.category()];
+ ContentSuggestionIdentifier* suggestionIdentifier =
+ [[ContentSuggestionIdentifier alloc] init];
+ suggestionIdentifier.IDInSection = suggestion_id.id_within_category();
+ suggestionIdentifier.sectionInfo = self.sectionInformationByCategory[wrapper];
+
+ [self.dataSink clearSuggestion:suggestionIdentifier];
}
- (void)contentSuggestionsServiceFullRefreshRequired:

Powered by Google App Engine
This is Rietveld 408576698