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

Unified Diff: content/browser/appcache/appcache_service_impl.cc

Issue 2422923002: Reduce usage of FOR_EACH_OBSERVER macro in content/browser (Closed)
Patch Set: skip cases in 2418143004 and 2418373002 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/browser/appcache/appcache_host.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_service_impl.cc
diff --git a/content/browser/appcache/appcache_service_impl.cc b/content/browser/appcache/appcache_service_impl.cc
index fbc0027dc4b7350e7f678ff50e478070963fa2af..847061ac8c43fe7348747ee4f0437e4a05303973 100644
--- a/content/browser/appcache/appcache_service_impl.cc
+++ b/content/browser/appcache/appcache_service_impl.cc
@@ -412,7 +412,8 @@ AppCacheServiceImpl::AppCacheServiceImpl(
AppCacheServiceImpl::~AppCacheServiceImpl() {
DCHECK(backends_.empty());
- FOR_EACH_OBSERVER(Observer, observers_, OnServiceDestructionImminent(this));
+ for (auto& observer : observers_)
+ observer.OnServiceDestructionImminent(this);
for (auto* helper : pending_helpers_)
helper->Cancel();
base::STLDeleteElements(&pending_helpers_);
@@ -472,8 +473,8 @@ void AppCacheServiceImpl::Reinitialize() {
// defer deletion of the old storage object.
scoped_refptr<AppCacheStorageReference> old_storage_ref(
new AppCacheStorageReference(std::move(storage_)));
- FOR_EACH_OBSERVER(Observer, observers_,
- OnServiceReinitialized(old_storage_ref.get()));
+ for (auto& observer : observers_)
+ observer.OnServiceReinitialized(old_storage_ref.get());
Initialize(cache_directory_, db_thread_, cache_thread_);
}
« no previous file with comments | « content/browser/appcache/appcache_host.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698