summaryrefslogtreecommitdiffstats
path: root/components/policy
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-25 18:44:56 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-25 18:44:56 +0000
commit37811771d1d07631322dd2abb89bbe720c454602 (patch)
tree935121761b15e1889ede1c408f50910a9d0c1de3 /components/policy
parent2d8334f86f97baeca6f430fa0449fb5006790a6d (diff)
downloadchromium_src-37811771d1d07631322dd2abb89bbe720c454602.zip
chromium_src-37811771d1d07631322dd2abb89bbe720c454602.tar.gz
chromium_src-37811771d1d07631322dd2abb89bbe720c454602.tar.bz2
Fixes and improvements to cloud policy for extensions.
- wait for the ExtensionService to be ready before processing install notifications. - avoid creating the managed storage leveldb cache if there are no policies set for that extension. - filter the initial policies loaded from the component policy cache. - always publish policy at the ForwardingPolicyProvider, even if nothing new was added; this sends the right notification later if a component is added back. - don't trigger updates when a SchemaRegistry gets an update with an empty map. - check if the Schema for an extension being shown in about:policy is valid before reading it. BUG=108992 Review URL: https://codereview.chromium.org/78953002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237111 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/policy')
-rw-r--r--components/policy/core/common/schema_registry.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/policy/core/common/schema_registry.cc b/components/policy/core/common/schema_registry.cc
index 16f71e5..ff95579 100644
--- a/components/policy/core/common/schema_registry.cc
+++ b/components/policy/core/common/schema_registry.cc
@@ -29,6 +29,9 @@ void SchemaRegistry::RegisterComponent(const PolicyNamespace& ns,
void SchemaRegistry::RegisterComponents(PolicyDomain domain,
const ComponentMap& components) {
+ // Don't issue notifications if nothing is being registered.
+ if (components.empty())
+ return;
// Assume that a schema was updated if the namespace was already registered
// before.
DomainMap map(schema_map_->GetDomains());