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

Unified Diff: chrome/browser/policy/forwarding_policy_provider.cc

Issue 78953002: Fixes and improvements to cloud policy for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments 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
Index: chrome/browser/policy/forwarding_policy_provider.cc
diff --git a/chrome/browser/policy/forwarding_policy_provider.cc b/chrome/browser/policy/forwarding_policy_provider.cc
index 31873e9ff62f53937eb9b5149bcb22c49484ca3a..82dad46e305e7db94d80b0bcd6b5315fece7e5ef 100644
--- a/chrome/browser/policy/forwarding_policy_provider.cc
+++ b/chrome/browser/policy/forwarding_policy_provider.cc
@@ -60,9 +60,16 @@ void ForwardingPolicyProvider::OnSchemaRegistryReady() {
}
void ForwardingPolicyProvider::OnSchemaRegistryUpdated(bool has_new_schemas) {
- if (!has_new_schemas || state_ != READY)
+ if (state_ != READY)
return;
- RefreshPolicies();
+ if (has_new_schemas) {
+ RefreshPolicies();
+ } else {
+ // Remove the policies that were being served for the component that have
+ // been removed. This is important so that update notifications are also
+ // sent in case those component are reinstalled during the current session.
+ OnUpdatePolicy(delegate_);
+ }
}
void ForwardingPolicyProvider::OnUpdatePolicy(

Powered by Google App Engine
This is Rietveld 408576698