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

Unified Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 2418143004: Reduce FOR_EACH_OBSERVER usage in content/browser/renderer_host (Closed)
Patch Set: rebase 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
Index: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
index f1b4897307f76dfc0a709be9ac64574b65b681d8..89340bb78793fb8fea3152d1544165479e238ba0 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
@@ -71,8 +71,8 @@ BrowserPpapiHostImpl::~BrowserPpapiHostImpl() {
// Notify instance observers about our impending destruction.
for (auto& instance_data : instance_map_) {
- FOR_EACH_OBSERVER(InstanceObserver, instance_data.second->observer_list,
- OnHostDestroyed());
+ for (auto& observer : instance_data.second->observer_list)
+ observer.OnHostDestroyed();
}
// Delete the host explicitly first. This shutdown will destroy the
@@ -180,8 +180,8 @@ void BrowserPpapiHostImpl::OnThrottleStateChanged(PP_Instance instance,
auto* data = instance_map_.get(instance);
if (data) {
data->is_throttled = is_throttled;
- FOR_EACH_OBSERVER(InstanceObserver, data->observer_list,
- OnThrottleStateChanged(is_throttled));
+ for (auto& observer : data->observer_list)
+ observer.OnThrottleStateChanged(is_throttled);
}
}
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698