Chromium Code Reviews| Index: chrome/browser/policy/cloud_policy_provider_impl.h |
| diff --git a/chrome/browser/policy/cloud_policy_provider_impl.h b/chrome/browser/policy/cloud_policy_provider_impl.h |
| index 71ef32c109b80d3415c7a8c305a52fd0939b4489..d521c4ac21a1bafc48a78551fb447b22ad2afa44 100644 |
| --- a/chrome/browser/policy/cloud_policy_provider_impl.h |
| +++ b/chrome/browser/policy/cloud_policy_provider_impl.h |
| @@ -14,16 +14,20 @@ |
| namespace policy { |
| +class BrowserPolicyConnector; |
| + |
| class CloudPolicyProviderImpl : public CloudPolicyProvider, |
| public CloudPolicyCacheBase::Observer { |
| public: |
| - CloudPolicyProviderImpl(const PolicyDefinitionList* policy_list, |
| + CloudPolicyProviderImpl(BrowserPolicyConnector* browser_policy_connector, |
| + const PolicyDefinitionList* policy_list, |
| CloudPolicyCacheBase::PolicyLevel level); |
| virtual ~CloudPolicyProviderImpl(); |
| // ConfigurationPolicyProvider implementation. |
| virtual bool ProvideInternal(PolicyMap* result) OVERRIDE; |
| virtual bool IsInitializationComplete() const OVERRIDE; |
| + virtual void RefreshPolicies() OVERRIDE; |
| // CloudPolicyCacheBase::Observer implementation. |
| virtual void OnCacheUpdate(CloudPolicyCacheBase* cache) OVERRIDE; |
| @@ -34,6 +38,8 @@ class CloudPolicyProviderImpl : public CloudPolicyProvider, |
| private: |
| friend class CloudPolicyProviderTest; |
| + typedef std::vector<CloudPolicyCacheBase*> ListType; |
| + |
| // Combines two PolicyMap and stores the result in out_map. The policies in |
| // |base| take precedence over the policies in |overlay|. Proxy policies are |
| // only applied in groups, that is if at least one proxy policy is present in |
| @@ -50,10 +56,19 @@ class CloudPolicyProviderImpl : public CloudPolicyProvider, |
| // groups. |
| void RecombineCachesAndTriggerUpdate(); |
| + // Removes |cache| from |caches|, if contained therein. |
|
Mattias Nissler (ping if slow)
2011/11/18 14:49:32
can be static.
Joao da Silva
2011/11/18 15:39:18
Done.
|
| + void RemoveCache(CloudPolicyCacheBase* cache, ListType* caches); |
| + |
| + // Weak pointer to the connector. Guaranteed to outlive |this|. |
| + BrowserPolicyConnector* browser_policy_connector_; |
| + |
| // The underlying policy caches. |
| - typedef std::vector<CloudPolicyCacheBase*> ListType; |
| ListType caches_; |
| + // Caches with pending updates. Used by RefreshPolicies to determine if a |
| + // refresh has fully completed. |
| + ListType pending_update_caches_; |
| + |
| // Policy level this provider will handle. |
| CloudPolicyCacheBase::PolicyLevel level_; |