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

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

Issue 11415094: Split UserCloudPolicyManager implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 1 month 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 95e8d0fac18783871cbe63ec0ea3345291d80442..3702a89bcaecff7fd7db5779fa89cb14abe389ed 100644
--- a/chrome/browser/policy/user_cloud_policy_store.h
+++ b/chrome/browser/policy/user_cloud_policy_store.h
@@ -13,6 +13,8 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/policy/user_cloud_policy_store_base.h"
+class Profile;
+
namespace policy {
// Implements a cloud policy store that is stored in a simple file in the user's
@@ -25,19 +27,22 @@ class UserCloudPolicyStore : public UserCloudPolicyStoreBase {
UserCloudPolicyStore(Profile* profile, const FilePath& policy_file);
virtual ~UserCloudPolicyStore();
- // Loads policy immediately on the current thread.
+ // Factory method for creating a UserCloudPolicyStore for |profile|.
+ static scoped_ptr<UserCloudPolicyStore> Create(Profile* profile);
+
+ // Loads policy immediately on the current thread. Virtual for mocks.
virtual void LoadImmediately();
+ // Deletes any existing policy blob and notifies observers via OnStoreLoaded()
+ // that the blob has changed. Virtual for mocks.
+ virtual void Clear();
+
// CloudPolicyStore implementation.
virtual void Load() OVERRIDE;
virtual void Store(
const enterprise_management::PolicyFetchResponse& policy) OVERRIDE;
- protected:
- virtual void RemoveStoredPolicy() OVERRIDE;
-
private:
-
// Callback invoked when a new policy has been loaded from disk. If
// |validate_in_background| is true, then policy is validated via a background
// thread.

Powered by Google App Engine
This is Rietveld 408576698