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

Unified Diff: ios/chrome/browser/reading_list/reading_list_model.cc

Issue 2420013005: Remove usage of FOR_EACH_OBSERVER macro in ios/ (Closed)
Patch Set: typo Created 4 years, 2 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/reading_list/reading_list_model.cc
diff --git a/ios/chrome/browser/reading_list/reading_list_model.cc b/ios/chrome/browser/reading_list/reading_list_model.cc
index 073ec3b759bcd874dbe77596632d27bf012f54d7..3407c0eb648a20738597c405d5ec4bab7463c57f 100644
--- a/ios/chrome/browser/reading_list/reading_list_model.cc
+++ b/ios/chrome/browser/reading_list/reading_list_model.cc
@@ -32,8 +32,8 @@ ReadingListModel::BeginBatchUpdates() {
++current_batch_updates_count_;
if (current_batch_updates_count_ == 1) {
- FOR_EACH_OBSERVER(ReadingListModelObserver, observers_,
- ReadingListModelBeganBatchUpdates(this));
+ for (auto& observer : observers_)
+ observer.ReadingListModelBeganBatchUpdates(this);
}
return token;
}
@@ -42,7 +42,7 @@ void ReadingListModel::EndBatchUpdates() {
DCHECK(IsPerformingBatchUpdates());
--current_batch_updates_count_;
if (current_batch_updates_count_ == 0) {
- FOR_EACH_OBSERVER(ReadingListModelObserver, observers_,
- ReadingListModelCompletedBatchUpdates(this));
+ for (auto& observer : observers_)
+ observer.ReadingListModelCompletedBatchUpdates(this);
}
}

Powered by Google App Engine
This is Rietveld 408576698