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

Unified Diff: components/policy/core/common/schema_registry.cc

Issue 2422083002: Remove usage of FOR_EACH_OBSERVER macro in components/policy (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 | « components/policy/core/common/remote_commands/remote_commands_queue.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/schema_registry.cc
diff --git a/components/policy/core/common/schema_registry.cc b/components/policy/core/common/schema_registry.cc
index a0b41052ec8d8d38bb170007edb55a7a4ab484a0..f5370c7219ef00ccc29124a046f3547c8758f256 100644
--- a/components/policy/core/common/schema_registry.cc
+++ b/components/policy/core/common/schema_registry.cc
@@ -21,9 +21,8 @@ SchemaRegistry::SchemaRegistry() : schema_map_(new SchemaMap) {
}
SchemaRegistry::~SchemaRegistry() {
- FOR_EACH_OBSERVER(InternalObserver,
- internal_observers_,
- OnSchemaRegistryShuttingDown(this));
+ for (auto& observer : internal_observers_)
+ observer.OnSchemaRegistryShuttingDown(this);
}
void SchemaRegistry::RegisterComponent(const PolicyNamespace& ns,
@@ -71,8 +70,10 @@ void SchemaRegistry::SetReady(PolicyDomain domain) {
if (domains_ready_[domain])
return;
domains_ready_[domain] = true;
- if (IsReady())
- FOR_EACH_OBSERVER(Observer, observers_, OnSchemaRegistryReady());
+ if (IsReady()) {
+ for (auto& observer : observers_)
+ observer.OnSchemaRegistryReady();
+ }
}
void SchemaRegistry::AddObserver(Observer* observer) {
@@ -92,8 +93,8 @@ void SchemaRegistry::RemoveInternalObserver(InternalObserver* observer) {
}
void SchemaRegistry::Notify(bool has_new_schemas) {
- FOR_EACH_OBSERVER(
- Observer, observers_, OnSchemaRegistryUpdated(has_new_schemas));
+ for (auto& observer : observers_)
+ observer.OnSchemaRegistryUpdated(has_new_schemas);
}
CombinedSchemaRegistry::CombinedSchemaRegistry()
« no previous file with comments | « components/policy/core/common/remote_commands/remote_commands_queue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698