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

Unified Diff: components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc

Issue 2794853004: Update provider on Reading List model update (Closed)
Patch Set: 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
« no previous file with comments | « components/ntp_snippets/reading_list/reading_list_suggestions_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc
diff --git a/components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc b/components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc
index d6366ef811e77df3bbb9d908d1526a613b7ceeb0..3fe02dbc2c48fd41f30e46226d94c1720939523f 100644
--- a/components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc
+++ b/components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc
@@ -127,6 +127,23 @@ void ReadingListSuggestionsProvider::ReadingListModelBeingDeleted(
reading_list_model_ = nullptr;
}
+void ReadingListSuggestionsProvider::ReadingListDidApplyChanges(
+ ReadingListModel* model) {
+ DCHECK(model == reading_list_model_);
+
+ if (model->IsPerformingBatchUpdates())
+ return;
+
+ FetchReadingListInternal();
+}
+
+void ReadingListSuggestionsProvider::ReadingListModelCompletedBatchUpdates(
+ const ReadingListModel* model) {
+ DCHECK(model == reading_list_model_);
+
+ FetchReadingListInternal();
+}
+
void ReadingListSuggestionsProvider::FetchReadingListInternal() {
if (!reading_list_model_)
return;
« no previous file with comments | « components/ntp_snippets/reading_list/reading_list_suggestions_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698