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

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

Issue 2739873003: Remove suggestions notified as invalid (Closed)
Patch Set: Fix the logic 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..a881c70968f0daf545027dd118883f2dbefa9b27 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
+++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
@@ -200,7 +200,15 @@ ntp_snippets::ContentSuggestion::ID SuggestionIDForSectionID(
(ntp_snippets::ContentSuggestionsService*)suggestionsService
SuggestionInvalidated:
lpromero 2017/03/09 10:00:44 Missed it before: lowercase S.
gambard 2017/03/09 12:21:23 Done.
(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