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

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

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed win build Created 9 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/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..ba1152596319ee13539452759851bbef450addaa 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;
@@ -50,10 +54,20 @@ class CloudPolicyProviderImpl : public CloudPolicyProvider,
// groups.
void RecombineCachesAndTriggerUpdate();
+ // Removes |cache| from |pending_update_caches_|, if contained therein.
+ void RemoveFromPending(CloudPolicyCacheBase* cache);
+
+ // 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_;

Powered by Google App Engine
This is Rietveld 408576698