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

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

Issue 2441653003: Enable fetching of admin policies for login screen apps (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
Index: components/policy/core/common/schema_registry.h
diff --git a/components/policy/core/common/schema_registry.h b/components/policy/core/common/schema_registry.h
index 82e16f8a958c2b1d8e054f7a6f9c0bf1d0c97661..35c63e09aa62fee47bde2141553306ad1d9f8ece 100644
--- a/components/policy/core/common/schema_registry.h
+++ b/components/policy/core/common/schema_registry.h
@@ -132,9 +132,12 @@ class POLICY_EXPORT ForwardingSchemaRegistry
public SchemaRegistry::Observer,
public SchemaRegistry::InternalObserver {
public:
+ // If |forward_readiness| is true, then this registry will become ready as
+ // soon as the wrapped registry gets ready.
+ //
// This registry will stop updating its SchemaMap when |wrapped| is
// destroyed.
- explicit ForwardingSchemaRegistry(SchemaRegistry* wrapped);
+ ForwardingSchemaRegistry(SchemaRegistry* wrapped, bool forward_readiness);
~ForwardingSchemaRegistry() override;
// SchemaRegistry:
@@ -144,12 +147,16 @@ class POLICY_EXPORT ForwardingSchemaRegistry
// SchemaRegistry::Observer:
void OnSchemaRegistryUpdated(bool has_new_schemas) override;
+ void OnSchemaRegistryReady() override;
// SchemaRegistry::InternalObserver:
void OnSchemaRegistryShuttingDown(SchemaRegistry* registry) override;
private:
+ void UpdateReadiness();
+
SchemaRegistry* wrapped_;
+ bool forward_readiness_;
DISALLOW_COPY_AND_ASSIGN(ForwardingSchemaRegistry);
};

Powered by Google App Engine
This is Rietveld 408576698