| 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 e922dff3cbc4259ee8e64cb8d3b4a74c9805bd9d..263caa9800a6fd20ca05aaa786f5a08c265ffed5 100644
|
| --- a/components/reading_list/ios/reading_list_model_impl.cc
|
| +++ b/components/reading_list/ios/reading_list_model_impl.cc
|
| @@ -146,6 +146,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()) {
|
|
|