Chromium Code Reviews| Index: chrome/browser/policy/configuration_policy_pref_store.h |
| diff --git a/chrome/browser/policy/configuration_policy_pref_store.h b/chrome/browser/policy/configuration_policy_pref_store.h |
| index a3e53978ff3b6a17f6575037b38d45ca8e06c898..c5b1e5adba9d385d76f0ada543f3c5c048ed6263 100644 |
| --- a/chrome/browser/policy/configuration_policy_pref_store.h |
| +++ b/chrome/browser/policy/configuration_policy_pref_store.h |
| @@ -19,6 +19,8 @@ class PrefValueMap; |
| namespace policy { |
| +class ConfigurationPolicyHandlerList; |
| + |
| // An implementation of PrefStore that bridges policy settings as read from the |
| // PolicyService to preferences. Converts POLICY_DOMAIN_CHROME policies a given |
| // PolicyLevel to their corresponding preferences. |
| @@ -26,9 +28,12 @@ class ConfigurationPolicyPrefStore |
| : public PrefStore, |
| public PolicyService::Observer { |
| public: |
| - // Does not take ownership of |service|. Only policies of the given |level| |
| - // will be mapped. |
| - ConfigurationPolicyPrefStore(PolicyService* service, PolicyLevel level); |
| + // Does not take ownership of |service| nor |handler_list|, which must outlive |
| + // the store.. Only policies of the given |level| will be mapped. |
|
Mattias Nissler (ping if slow)
2013/08/12 13:38:28
nit: One period is enough.
Joao da Silva
2013/08/12 15:41:55
Done.
|
| + ConfigurationPolicyPrefStore( |
| + PolicyService* service, |
| + const ConfigurationPolicyHandlerList* handler_list, |
| + PolicyLevel level); |
|
bartfab (slow)
2013/08/12 13:27:53
Nit: #include "chrome/browser/policy/policy_types.
Joao da Silva
2013/08/12 15:41:55
Done.
|
| // PrefStore methods: |
| virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; |
| @@ -44,16 +49,6 @@ class ConfigurationPolicyPrefStore |
| const PolicyMap& current) OVERRIDE; |
| virtual void OnPolicyServiceInitialized(PolicyDomain domain) OVERRIDE; |
| - // Creates a ConfigurationPolicyPrefStore that only provides policies that |
| - // have POLICY_LEVEL_MANDATORY level. |
| - static ConfigurationPolicyPrefStore* CreateMandatoryPolicyPrefStore( |
| - PolicyService* policy_service); |
| - |
| - // Creates a ConfigurationPolicyPrefStore that only provides policies that |
| - // have POLICY_LEVEL_RECOMMENDED level. |
| - static ConfigurationPolicyPrefStore* CreateRecommendedPolicyPrefStore( |
| - PolicyService* policy_service); |
| - |
| private: |
| virtual ~ConfigurationPolicyPrefStore(); |
| @@ -68,6 +63,10 @@ class ConfigurationPolicyPrefStore |
| // The PolicyService from which policy settings are read. |
| PolicyService* policy_service_; |
| + // The policy handlers used to convert policies into their corresponding |
| + // preferences. |
| + const ConfigurationPolicyHandlerList* handler_list_; |
| + |
| // The policy level that this PrefStore uses. |
| PolicyLevel level_; |