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

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

Issue 6074003: Handle policy refresh internally in ConfigurationPolicyPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 10 years 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/configuration_policy_provider.h
diff --git a/chrome/browser/policy/configuration_policy_provider.h b/chrome/browser/policy/configuration_policy_provider.h
index 6d5cc7c68007bad6f9d22544161eba1b9c705022..b036eb3881b291d4c75bfb2df7a48d29ea1c8fcf 100644
--- a/chrome/browser/policy/configuration_policy_provider.h
+++ b/chrome/browser/policy/configuration_policy_provider.h
@@ -38,24 +38,29 @@ class ConfigurationPolicyProvider {
virtual ~ConfigurationPolicyProvider();
- // Must be implemented by provider subclasses to specify the
- // provider-specific policy decisions. The preference service
- // invokes this |Provide| method when it needs a policy
- // provider to specify its policy choices. In |Provide|,
- // the |ConfigurationPolicyProvider| must make calls to the
- // |Apply| method of |store| to apply specific policies.
- // Returns true if the policy could be provided, otherwise false.
+ // Must be implemented by provider subclasses to specify the provider-specific
+ // policy decisions. The preference service invokes this |Provide| method when
+ // it needs a policy provider to specify its policy choices. In |Provide|, the
+ // |ConfigurationPolicyProvider| must make calls to the |Apply| method of
+ // |store| to apply specific policies. Returns true if the policy could be
+ // provided, otherwise false.
virtual bool Provide(ConfigurationPolicyStoreInterface* store) = 0;
+ // Check whether this provider has completed initialization. This is used to
+ // detect whether initialization is done in case providers implementations
+ // need to do asynchronous operations for initialization.
+ virtual bool IsInitializationComplete() const { return true; }
+
// Called by the subclass provider at any time to indicate that the currently
// applied policy is not longer current. A policy refresh will be initiated as
// soon as possible.
virtual void NotifyStoreOfPolicyChange();
+ protected:
// Decodes the value tree and writes the configuration to the given |store|.
void DecodePolicyValueTree(const DictionaryValue* policies,
ConfigurationPolicyStoreInterface* store);
- protected:
+
const PolicyDefinitionList* policy_definition_list() const {
return policy_definition_list_;
}

Powered by Google App Engine
This is Rietveld 408576698