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

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: Removed debugging statements that are unneeded. 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..8550393f9db6a1860360edc62f5bce1bae7df0f9 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,8 @@ 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);
Mattias Nissler (ping if slow) 2012/08/23 09:28:35 indentation.
Andrew T Wilson (Slow) 2012/08/23 18:00:08 Done.
virtual ~UserCloudPolicyStore();
// CloudPolicyStore implementation.
@@ -33,20 +35,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);
};

Powered by Google App Engine
This is Rietveld 408576698