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

Unified Diff: base/memory/memory_pressure_listener.cc

Issue 2418933004: Reduce usage of FOR_EACH_OBSERVER macro in base (Closed)
Patch Set: 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 | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_listener.cc
diff --git a/base/memory/memory_pressure_listener.cc b/base/memory/memory_pressure_listener.cc
index 11859ada613f77cd9418e87351d17c2f948589b2..27e700189bd32363e62b8ddd1f4b9e5567dc0112 100644
--- a/base/memory/memory_pressure_listener.cc
+++ b/base/memory/memory_pressure_listener.cc
@@ -38,8 +38,8 @@ class MemoryPressureObserver {
async_observers_->Notify(FROM_HERE,
&MemoryPressureListener::Notify, memory_pressure_level);
AutoLock lock(sync_observers_lock_);
- FOR_EACH_OBSERVER(MemoryPressureListener, *sync_observers_,
- MemoryPressureListener::SyncNotify(memory_pressure_level));
+ for (auto& observer : *sync_observers_)
+ observer.MemoryPressureListener::SyncNotify(memory_pressure_level);
}
private:
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698