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

Unified Diff: ios/web/active_state_manager_impl.mm

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/web/active_state_manager_impl.mm
diff --git a/ios/web/active_state_manager_impl.mm b/ios/web/active_state_manager_impl.mm
index d2f3b1edfd4da8a1a3b4fdf2e90d405c676e2193..0fa3cda373ee5e2c486ed4548286bf19b52b6b25 100644
--- a/ios/web/active_state_manager_impl.mm
+++ b/ios/web/active_state_manager_impl.mm
@@ -27,7 +27,8 @@ ActiveStateManagerImpl::ActiveStateManagerImpl(BrowserState* browser_state)
}
ActiveStateManagerImpl::~ActiveStateManagerImpl() {
- FOR_EACH_OBSERVER(Observer, observer_list_, WillBeDestroyed());
+ for (auto& observer : observer_list_)
+ observer.WillBeDestroyed();
DCHECK(!IsActive());
}
@@ -46,9 +47,11 @@ void ActiveStateManagerImpl::SetActive(bool active) {
active_ = active;
if (active) {
- FOR_EACH_OBSERVER(Observer, observer_list_, OnActive());
+ for (auto& observer : observer_list_)
+ observer.OnActive();
} else {
- FOR_EACH_OBSERVER(Observer, observer_list_, OnInactive());
+ for (auto& observer : observer_list_)
+ observer.OnInactive();
}
}

Powered by Google App Engine
This is Rietveld 408576698