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

Unified Diff: components/infobars/core/infobar_manager.cc

Issue 2440303002: Remove usage of FOR_EACH_OBSERVER macro in components/ (Closed)
Patch Set: remove superfluous return 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
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.cc ('k') | components/metrics/leak_detector/leak_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/infobars/core/infobar_manager.cc
diff --git a/components/infobars/core/infobar_manager.cc b/components/infobars/core/infobar_manager.cc
index e1ca4f06c9d4ac0086d22bc9e42b41e312ca74b3..06d1b2861c9f8e5a6376aaaec1a60dd168e3ab2e 100644
--- a/components/infobars/core/infobar_manager.cc
+++ b/components/infobars/core/infobar_manager.cc
@@ -85,9 +85,8 @@ InfoBar* InfoBarManager::ReplaceInfoBar(InfoBar* old_infobar,
// to AddInfoBar() or similar, we don't dupe-check against this infobar.
infobars_.erase(++i);
- FOR_EACH_OBSERVER(Observer,
- observer_list_,
- OnInfoBarReplaced(old_infobar, new_infobar_ptr));
+ for (Observer& observer : observer_list_)
+ observer.OnInfoBarReplaced(old_infobar, new_infobar_ptr);
old_infobar->CloseSoon();
return new_infobar_ptr;
@@ -114,7 +113,8 @@ void InfoBarManager::ShutDown() {
// Destroy all remaining InfoBars. It's important to not animate here so that
// we guarantee that we'll delete all delegates before we do anything else.
RemoveAllInfoBars(false);
- FOR_EACH_OBSERVER(Observer, observer_list_, OnManagerShuttingDown(this));
+ for (Observer& observer : observer_list_)
+ observer.OnManagerShuttingDown(this);
}
void InfoBarManager::OnNavigation(
@@ -130,12 +130,13 @@ void InfoBarManager::OnNavigation(
}
void InfoBarManager::NotifyInfoBarAdded(InfoBar* infobar) {
- FOR_EACH_OBSERVER(Observer, observer_list_, OnInfoBarAdded(infobar));
+ for (Observer& observer : observer_list_)
+ observer.OnInfoBarAdded(infobar);
}
void InfoBarManager::NotifyInfoBarRemoved(InfoBar* infobar, bool animate) {
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnInfoBarRemoved(infobar, animate));
+ for (Observer& observer : observer_list_)
+ observer.OnInfoBarRemoved(infobar, animate);
}
void InfoBarManager::RemoveInfoBarInternal(InfoBar* infobar, bool animate) {
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.cc ('k') | components/metrics/leak_detector/leak_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698