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..3910cfd9ccce2c993a74af1ad5aa5342b4dc73cc 100644 |
--- a/components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc |
+++ b/components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc |
@@ -127,10 +127,27 @@ void ReadingListSuggestionsProvider::ReadingListModelBeingDeleted( |
reading_list_model_ = nullptr; |
} |
+void ReadingListSuggestionsProvider::ReadingListDidApplyChanges( |
+ ReadingListModel* model) { |
+ DCHECK(model == reading_list_model_); |
+ |
+ FetchReadingListInternal(); |
+} |
+ |
+void ReadingListSuggestionsProvider::ReadingListModelCompletedBatchUpdates( |
+ const ReadingListModel* model) { |
+ DCHECK(model == reading_list_model_); |
+ |
+ FetchReadingListInternal(); |
+} |
+ |
void ReadingListSuggestionsProvider::FetchReadingListInternal() { |
if (!reading_list_model_) |
return; |
+ if (reading_list_model_->IsPerformingBatchUpdates()) |
Olivier
2017/04/03 13:13:53
super nit: group with the if above.
Marc Treib
2017/04/04 16:57:49
nit: Braces please, also above
gambard
2017/04/05 08:08:55
Done.
gambard
2017/04/05 08:08:55
Done.
|
+ return; |
+ |
DCHECK(reading_list_model_->loaded()); |
std::vector<const ReadingListEntry*> entries; |
for (const GURL& url : reading_list_model_->Keys()) { |