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

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

Issue 6537020: Update policy backend and testserver for the newest policy protocol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests and chromeos crashes Created 9 years, 10 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
Index: chrome/browser/policy/cloud_policy_cache.h
diff --git a/chrome/browser/policy/cloud_policy_cache.h b/chrome/browser/policy/cloud_policy_cache.h
index 5e7745aa612ed349e74284da9182f12dbcfe0424..250890923792d0dd4a172fd8d246df8a2b789cdf 100644
--- a/chrome/browser/policy/cloud_policy_cache.h
+++ b/chrome/browser/policy/cloud_policy_cache.h
@@ -52,7 +52,7 @@ class CloudPolicyCache : public base::NonThreadSafe {
void LoadFromFile();
// Resets the policy information.
- void SetPolicy(const em::CloudPolicyResponse& policy);
+ void SetPolicy(const em::PolicyFetchResponse& policy);
void SetDevicePolicy(const em::DevicePolicyResponse& policy);
ConfigurationPolicyProvider* GetManagedPolicyProvider();
@@ -68,6 +68,10 @@ class CloudPolicyCache : public base::NonThreadSafe {
return last_policy_refresh_time_;
}
+ int64 last_policy_server_timestamp() {
+ return last_policy_server_timestamp_;
+ }
+
// Returns true if this cache holds (old-style) device policy that should be
// given preference over (new-style) mandatory/recommended policy.
bool has_device_policy() const {
@@ -85,10 +89,11 @@ class CloudPolicyCache : public base::NonThreadSafe {
// maps and a timestamp. Also performs verification, returns NULL if any
// check fails.
static bool DecodePolicyResponse(
- const em::CloudPolicyResponse& policy_response,
+ const em::PolicyFetchResponse& policy_response,
PolicyMap* mandatory,
PolicyMap* recommended,
- base::Time* timestamp);
+ base::Time* timestamp,
+ int64* raw_timestamp);
// Returns true if |certificate_chain| is trusted and a |signature| created
// from it matches |data|.
@@ -134,6 +139,9 @@ class CloudPolicyCache : public base::NonThreadSafe {
// The time at which the policy was last refreshed.
base::Time last_policy_refresh_time_;
+ // The last timestamp received from the server with policy.
+ int64 last_policy_server_timestamp_;
Jakob Kummerow 2011/02/28 11:06:31 Why do we need this as a separate field? As discus
gfeher 2011/02/28 12:21:32 Another reason for using this was that SetUnmanage
+
// Policy providers.
scoped_ptr<ConfigurationPolicyProvider> managed_policy_provider_;
scoped_ptr<ConfigurationPolicyProvider> recommended_policy_provider_;
« no previous file with comments | « no previous file | chrome/browser/policy/cloud_policy_cache.cc » ('j') | chrome/browser/policy/cloud_policy_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698