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

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

Issue 10825415: Added code to persist downloaded cloud policy to disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More review feedback addressed. Created 8 years, 4 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/user_cloud_policy_store.h
diff --git a/chrome/browser/policy/user_cloud_policy_store.h b/chrome/browser/policy/user_cloud_policy_store.h
index f75f4a6535b9f2b443d1fd6b11d3a12aa8b48015..8be8247dc54a9cc2616c7c7fe75a8a9a542ac54b 100644
--- a/chrome/browser/policy/user_cloud_policy_store.h
+++ b/chrome/browser/policy/user_cloud_policy_store.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/file_path.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/policy/user_cloud_policy_store_base.h"
@@ -21,7 +22,7 @@ class UserCloudPolicyStore : public UserCloudPolicyStoreBase {
public:
// Creates a policy store associated with the user signed in to this
// |profile|.
- explicit UserCloudPolicyStore(Profile* profile);
+ UserCloudPolicyStore(Profile* profile, const FilePath& policy_file);
virtual ~UserCloudPolicyStore();
// CloudPolicyStore implementation.
@@ -33,20 +34,32 @@ class UserCloudPolicyStore : public UserCloudPolicyStoreBase {
virtual void RemoveStoredPolicy() OVERRIDE;
private:
+
+ // Callback invoked when a new policy has been loaded from disk.
+ void PolicyLoaded(struct PolicyLoadResult policy_load_result);
+
// Starts policy blob validation. |callback| is invoked once validation is
// complete.
void Validate(
scoped_ptr<enterprise_management::PolicyFetchResponse> policy,
const UserCloudPolicyValidator::CompletionCallback& callback);
+ // Callback invoked to install a just-loaded policy after validation has
+ // finished.
+ void InstallLoadedPolicyAfterValidation(UserCloudPolicyValidator* validator);
+
// Callback invoked to store the policy after validation has finished.
void StorePolicyAfterValidation(UserCloudPolicyValidator* validator);
+ // WeakPtrFactory used to create callbacks for validating and storing policy.
base::WeakPtrFactory<UserCloudPolicyStore> weak_factory_;
// Weak pointer to the profile associated with this store.
Profile* profile_;
+ // Path to file where we store persisted policy.
+ FilePath backing_file_path_;
+
DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStore);
};
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_manager.cc ('k') | chrome/browser/policy/user_cloud_policy_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698