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

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

Issue 6705031: Send policy blobs to session_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 9 years, 9 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/profile_policy_connector.cc ('k') | chrome/browser/policy/user_policy_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/user_policy_cache.h
diff --git a/chrome/browser/policy/user_policy_cache.h b/chrome/browser/policy/user_policy_cache.h
new file mode 100644
index 0000000000000000000000000000000000000000..316497fe0dcafa1b88cbe95b001f9e3da6c00ab4
--- /dev/null
+++ b/chrome/browser/policy/user_policy_cache.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_
+#define CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_
+#pragma once
+
+#include "base/file_path.h"
+#include "chrome/browser/policy/cloud_policy_cache_base.h"
+
+namespace policy {
+
+// CloudPolicyCacheBase implementation that persists policy information
+// into the file specified by the c'tor parameter |backing_file_path|.
+class UserPolicyCache : public CloudPolicyCacheBase {
+ public:
+ explicit UserPolicyCache(const FilePath& backing_file_path);
+ virtual ~UserPolicyCache();
+
+ // CloudPolicyCacheBase implementation:
+ virtual void Load() OVERRIDE;
+ virtual void SetPolicy(const em::PolicyFetchResponse& policy) OVERRIDE;
+ virtual void SetUnmanaged() OVERRIDE;
+
+ private:
+ void PersistPolicy(const em::PolicyFetchResponse& policy,
+ const base::Time& timestamp);
+
+ // CloudPolicyCacheBase implementation:
+ virtual bool DecodePolicyData(const em::PolicyData& policy_data,
+ PolicyMap* mandatory,
+ PolicyMap* recommended) OVERRIDE;
+
+ // The file in which we store a cached version of the policy information.
+ const FilePath backing_file_path_;
+
+ DISALLOW_COPY_AND_ASSIGN(UserPolicyCache);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_
« no previous file with comments | « chrome/browser/policy/profile_policy_connector.cc ('k') | chrome/browser/policy/user_policy_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698