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

Unified Diff: chrome/browser/policy/schema_registry.h

Issue 60823003: Introduced a ForwardingPolicyProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed ios Created 7 years, 1 month 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 | « chrome/browser/policy/profile_policy_connector_stub.cc ('k') | chrome/browser/policy/schema_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/schema_registry.h
diff --git a/chrome/browser/policy/schema_registry.h b/chrome/browser/policy/schema_registry.h
index 0769003051d9892a2d9505799b36f1d9b4d3483d..5134f0c22b1188cd6790eaab61b38988e393452f 100644
--- a/chrome/browser/policy/schema_registry.h
+++ b/chrome/browser/policy/schema_registry.h
@@ -35,6 +35,9 @@ class SchemaRegistry : public base::NonThreadSafe {
// (e.g. for periodic reloads).
virtual void OnSchemaRegistryUpdated(bool has_new_schemas) = 0;
+ // Invoked when all policy domains become ready.
+ virtual void OnSchemaRegistryReady() = 0;
+
protected:
virtual ~Observer();
};
@@ -54,6 +57,14 @@ class SchemaRegistry : public base::NonThreadSafe {
virtual void UnregisterComponent(const PolicyNamespace& ns);
+ // Returns true if all domains have registered the initial components.
+ bool IsReady() const;
+
+ // This indicates that the initial components for |domain| have all been
+ // registered. It must be invoked at least once for each policy domain;
+ // subsequent calls for the same domain are ignored.
+ void SetReady(PolicyDomain domain);
+
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
@@ -66,6 +77,7 @@ class SchemaRegistry : public base::NonThreadSafe {
private:
ObserverList<Observer, true> observers_;
+ bool domains_ready_[POLICY_DOMAIN_SIZE];
DISALLOW_COPY_AND_ASSIGN(SchemaRegistry);
};
@@ -87,6 +99,8 @@ class CombinedSchemaRegistry : public SchemaRegistry,
virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE;
+ virtual void OnSchemaRegistryReady() OVERRIDE;
+
private:
void Combine(bool has_new_schemas);
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_stub.cc ('k') | chrome/browser/policy/schema_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698