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

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

Issue 337053005: Precache policy-for-extensions for device-local accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed ios tests Created 6 years, 6 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.cc
diff --git a/components/policy/core/common/schema_registry.cc b/components/policy/core/common/schema_registry.cc
index f3cb0ed64ced8236e167a3b0c5da105bcd1a5610..8df24843627cee24efcbcb7d7fa85c0348d87e0a 100644
--- a/components/policy/core/common/schema_registry.cc
+++ b/components/policy/core/common/schema_registry.cc
@@ -193,9 +193,6 @@ ForwardingSchemaRegistry::ForwardingSchemaRegistry(SchemaRegistry* wrapped)
schema_map_ = wrapped_->schema_map();
wrapped_->AddObserver(this);
wrapped_->AddInternalObserver(this);
- // This registry is always ready.
- for (int i = 0; i < POLICY_DOMAIN_SIZE; ++i)
- SetReady(static_cast<PolicyDomain>(i));
}
ForwardingSchemaRegistry::~ForwardingSchemaRegistry() {
@@ -208,7 +205,10 @@ ForwardingSchemaRegistry::~ForwardingSchemaRegistry() {
void ForwardingSchemaRegistry::RegisterComponents(
PolicyDomain domain,
const ComponentMap& components) {
- if (wrapped_)
+ // POLICY_DOMAIN_CHROME is skipped to avoid spurious updated when a new
bartfab (slow) 2014/06/23 09:53:38 Nit: s/updated/updates/
Joao da Silva 2014/07/16 11:47:52 Done.
+ // Profile is created. If the ForwardingSchemaRegistry is meant to be used
bartfab (slow) 2014/06/23 09:53:38 Nit: s/meant to be//
Joao da Silva 2014/07/16 11:47:52 Done.
+ // outside device-level accounts then this should become configurable.
+ if (wrapped_ && domain != POLICY_DOMAIN_CHROME)
wrapped_->RegisterComponents(domain, components);
// Ignore otherwise.
}

Powered by Google App Engine
This is Rietveld 408576698