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

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

Issue 9111022: Removed ConfigurationPolicyType and extended PolicyMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 11 months 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
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_cache_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_cache_base.h
diff --git a/chrome/browser/policy/cloud_policy_cache_base.h b/chrome/browser/policy/cloud_policy_cache_base.h
index 54b0eaac37f89f5ed8cf8be85f661bcb7c0b2254..73915959e0ec724b0a9dcd038f0ce28f276dbea5 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_;
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_cache_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698