summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy/cloud_policy_cache_base.h
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-22 16:25:52 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-22 16:25:52 +0000
commit4cbb342347f7bffe9d556a49b80c2365f97a38c0 (patch)
tree011c6cf5a72a8ad1dc975e4ed539159b8247a673 /chrome/browser/policy/cloud_policy_cache_base.h
parent903b8fd96392bc2ec7525353b8dcdb1de401ae7b (diff)
downloadchromium_src-4cbb342347f7bffe9d556a49b80c2365f97a38c0.zip
chromium_src-4cbb342347f7bffe9d556a49b80c2365f97a38c0.tar.gz
chromium_src-4cbb342347f7bffe9d556a49b80c2365f97a38c0.tar.bz2
Removed ConfigurationPolicyType and extended PolicyMap.
PolicyMap was strongly coupled to specific Chrome policies, through the ConfigurationPolicyType. That enum has been removed and replaced by strings. Also introduced new PolicyMap-related enums: PolicyScope and PolicyLevel. Started removing mandatory/recommended policy_maps around. Currently there are still mandatory/recommended providers, but that'll go away after this. TBR=jhawkins@chromium.org BUG=108993 TEST=All works as before Review URL: https://chromiumcodereview.appspot.com/9111022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/cloud_policy_cache_base.h')
-rw-r--r--chrome/browser/policy/cloud_policy_cache_base.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/chrome/browser/policy/cloud_policy_cache_base.h b/chrome/browser/policy/cloud_policy_cache_base.h
index 54b0eaac..7391595 100644
--- a/chrome/browser/policy/cloud_policy_cache_base.h
+++ b/chrome/browser/policy/cloud_policy_cache_base.h
@@ -22,14 +22,6 @@ class PolicyNotifier;
// and makes it available via policy providers.
class CloudPolicyCacheBase : public base::NonThreadSafe {
public:
- // Used to distinguish mandatory from recommended policies.
- enum PolicyLevel {
- // Policy is forced upon the user and should always take effect.
- POLICY_LEVEL_MANDATORY,
- // The value is just a recommendation that the user may override.
- POLICY_LEVEL_RECOMMENDED,
- };
-
class Observer {
public:
virtual ~Observer() {}
@@ -79,8 +71,8 @@ class CloudPolicyCacheBase : public base::NonThreadSafe {
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
- // Accessor for the underlying PolicyMaps.
- const PolicyMap* policy(PolicyLevel level);
+ // Accessor for the underlying PolicyMap.
+ const PolicyMap* policy() { return &policies_; }
// Resets the cache, clearing the policy currently stored in memory and the
// last refresh time.
@@ -101,7 +93,7 @@ class CloudPolicyCacheBase : public base::NonThreadSafe {
};
// Decodes the given |policy| using |DecodePolicyResponse()|, applies the
- // contents to |{mandatory,recommended}_policy_|, and notifies observers.
+ // contents to |policies_|, and notifies observers.
// |timestamp| returns the timestamp embedded in |policy|, callers can pass
// NULL if they don't care. |check_for_timestamp_validity| tells this method
// to discard policy data with a timestamp from the future.
@@ -120,15 +112,13 @@ class CloudPolicyCacheBase : public base::NonThreadSafe {
// the results.
virtual bool DecodePolicyData(
const enterprise_management::PolicyData& policy_data,
- PolicyMap* mandatory,
- PolicyMap* recommended) = 0;
+ PolicyMap* policies) = 0;
// Decodes a PolicyFetchResponse into two PolicyMaps and a timestamp.
// Also performs verification, returns NULL if any check fails.
bool DecodePolicyResponse(
const enterprise_management::PolicyFetchResponse& policy_response,
- PolicyMap* mandatory,
- PolicyMap* recommended,
+ PolicyMap* policies,
base::Time* timestamp,
PublicKeyVersion* public_key_version);
@@ -148,8 +138,7 @@ class CloudPolicyCacheBase : public base::NonThreadSafe {
friend class MockCloudPolicyCache;
// Policy key-value information.
- PolicyMap mandatory_policy_;
- PolicyMap recommended_policy_;
+ PolicyMap policies_;
PolicyNotifier* notifier_;