| Index: components/reading_list/ios/reading_list_model_impl.cc
|
| diff --git a/components/reading_list/ios/reading_list_model_impl.cc b/components/reading_list/ios/reading_list_model_impl.cc
|
| index 75024fbf3456766dea7859ee392c1bde620af450..441f02eb4e7f9f71ca989b7af23ecab9a342aec2 100644
|
| --- a/components/reading_list/ios/reading_list_model_impl.cc
|
| +++ b/components/reading_list/ios/reading_list_model_impl.cc
|
| @@ -143,6 +143,18 @@ void ReadingListModelImpl::MarkAllSeen() {
|
| DCHECK(unseen_entry_count_ == 0);
|
| }
|
|
|
| +bool ReadingListModelImpl::DeleteAllEntries() {
|
| + DCHECK(CalledOnValidThread());
|
| + if (!loaded()) {
|
| + return false;
|
| + }
|
| + auto scoped_model_batch_updates = BeginBatchUpdates();
|
| + for (const auto& url : Keys()) {
|
| + RemoveEntryByURL(url);
|
| + }
|
| + return entries_->empty();
|
| +}
|
| +
|
| void ReadingListModelImpl::UpdateEntryStateCountersOnEntryRemoval(
|
| const ReadingListEntry& entry) {
|
| if (!entry.HasBeenSeen()) {
|
|
|