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

Unified Diff: content/public/test/mock_download_item.cc

Issue 2422933002: Reduce usage of FOR_EACH_OBSERVER macro in content/ (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 | « content/child/worker_thread_registry.cc ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_download_item.cc
diff --git a/content/public/test/mock_download_item.cc b/content/public/test/mock_download_item.cc
index 562972a2658e7f1d73d4d496f9e13d5cf4cd28bb..7b19c3195401c978600d92a8765c49f77202cafb 100644
--- a/content/public/test/mock_download_item.cc
+++ b/content/public/test/mock_download_item.cc
@@ -9,7 +9,8 @@ namespace content {
MockDownloadItem::MockDownloadItem() {}
MockDownloadItem::~MockDownloadItem() {
- FOR_EACH_OBSERVER(Observer, observers_, OnDownloadDestroyed(this));
+ for (auto& observer : observers_)
+ observer.OnDownloadDestroyed(this);
}
void MockDownloadItem::AddObserver(Observer* observer) {
@@ -21,15 +22,18 @@ void MockDownloadItem::RemoveObserver(Observer* observer) {
}
void MockDownloadItem::NotifyObserversDownloadOpened() {
- FOR_EACH_OBSERVER(Observer, observers_, OnDownloadOpened(this));
+ for (auto& observer : observers_)
+ observer.OnDownloadOpened(this);
}
void MockDownloadItem::NotifyObserversDownloadRemoved() {
- FOR_EACH_OBSERVER(Observer, observers_, OnDownloadRemoved(this));
+ for (auto& observer : observers_)
+ observer.OnDownloadRemoved(this);
}
void MockDownloadItem::NotifyObserversDownloadUpdated() {
- FOR_EACH_OBSERVER(Observer, observers_, OnDownloadUpdated(this));
+ for (auto& observer : observers_)
+ observer.OnDownloadUpdated(this);
}
}
« no previous file with comments | « content/child/worker_thread_registry.cc ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698