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

Unified Diff: content/browser/shared_worker/shared_worker_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/notification_service_impl.cc ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/shared_worker/shared_worker_service_impl.cc
diff --git a/content/browser/shared_worker/shared_worker_service_impl.cc b/content/browser/shared_worker/shared_worker_service_impl.cc
index e635448ea277f78d0caea5434130598243619599..291df2c487247c79446b803cfe58713111af0ef7 100644
--- a/content/browser/shared_worker/shared_worker_service_impl.cc
+++ b/content/browser/shared_worker/shared_worker_service_impl.cc
@@ -474,9 +474,8 @@ void SharedWorkerServiceImpl::RenderFrameDetached(int render_process_id,
void SharedWorkerServiceImpl::NotifyWorkerDestroyed(int worker_process_id,
int worker_route_id) {
- FOR_EACH_OBSERVER(WorkerServiceObserver,
- observers_,
- WorkerDestroyed(worker_process_id, worker_route_id));
+ for (auto& observer : observers_)
+ observer.WorkerDestroyed(worker_process_id, worker_route_id);
}
blink::WebWorkerCreationError
@@ -593,10 +592,8 @@ void SharedWorkerServiceImpl::RenderProcessReservedCallback(
host->Start(pause_on_start);
ProcessRouteIdPair key(worker_process_id, worker_route_id);
worker_hosts_[key] = std::move(host);
- FOR_EACH_OBSERVER(
- WorkerServiceObserver,
- observers_,
- WorkerCreated(url, name, worker_process_id, worker_route_id));
+ for (auto& observer : observers_)
+ observer.WorkerCreated(url, name, worker_process_id, worker_route_id);
}
void SharedWorkerServiceImpl::RenderProcessReserveFailedCallback(
« no previous file with comments | « content/browser/notification_service_impl.cc ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698