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

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

Issue 44083005: policy: Remove UserCloudPolicyManagerFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 2 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/user_cloud_policy_store.h
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_store.h b/chrome/browser/policy/cloud/user_cloud_policy_store.h
index b1fcdbe5f9cc31e189ff9b2cbfbbcf67dce15610..1c246d8b93a84c23404f1d9e2333482d7b4a24d2 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_store.h
+++ b/chrome/browser/policy/cloud/user_cloud_policy_store.h
@@ -13,12 +13,14 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/policy/cloud/user_cloud_policy_store_base.h"
-class Profile;
-
namespace base {
class SequencedTaskRunner;
}
+namespace content {
+class BrowserContext;
+}
+
namespace policy {
// Implements a cloud policy store that is stored in a simple file in the user's
@@ -27,16 +29,16 @@ namespace policy {
class UserCloudPolicyStore : public UserCloudPolicyStoreBase {
public:
// Creates a policy store associated with the user signed in to this
- // |profile|.
+ // |context|.
UserCloudPolicyStore(
- Profile* profile,
+ content::BrowserContext* context,
const base::FilePath& policy_file,
scoped_refptr<base::SequencedTaskRunner> background_task_runner);
virtual ~UserCloudPolicyStore();
- // Factory method for creating a UserCloudPolicyStore for |profile|.
+ // Factory method for creating a UserCloudPolicyStore for |context|.
static scoped_ptr<UserCloudPolicyStore> Create(
- Profile* profile,
+ content::BrowserContext* context,
scoped_refptr<base::SequencedTaskRunner> background_task_runner);
// Loads policy immediately on the current thread. Virtual for mocks.
@@ -77,8 +79,8 @@ class UserCloudPolicyStore : public UserCloudPolicyStoreBase {
// 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_;
+ // Weak pointer to the context associated with this store.
+ content::BrowserContext* context_;
// Path to file where we store persisted policy.
base::FilePath backing_file_path_;

Powered by Google App Engine
This is Rietveld 408576698