Index: chrome/browser/policy/cloud/user_cloud_policy_store.cc |
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_store.cc b/chrome/browser/policy/cloud/user_cloud_policy_store.cc |
index cda8fb7f1c57b500da256413d8725a38faebb1a0..4e4bc04289ede40dfdde08c34967e812739ff11f 100644 |
--- a/chrome/browser/policy/cloud/user_cloud_policy_store.cc |
+++ b/chrome/browser/policy/cloud/user_cloud_policy_store.cc |
@@ -10,7 +10,6 @@ |
#include "base/task_runner_util.h" |
#include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
#include "chrome/browser/policy/proto/cloud/device_management_local.pb.h" |
-#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/signin/signin_manager.h" |
#include "chrome/browser/signin/signin_manager_factory.h" |
#include "policy/policy_constants.h" |
@@ -94,24 +93,24 @@ void StorePolicyToDiskOnBackgroundThread( |
} // namespace |
UserCloudPolicyStore::UserCloudPolicyStore( |
- Profile* profile, |
+ content::BrowserContext* context, |
const base::FilePath& path, |
scoped_refptr<base::SequencedTaskRunner> background_task_runner) |
: UserCloudPolicyStoreBase(background_task_runner), |
weak_factory_(this), |
- profile_(profile), |
+ context_(context), |
backing_file_path_(path) {} |
UserCloudPolicyStore::~UserCloudPolicyStore() {} |
// static |
scoped_ptr<UserCloudPolicyStore> UserCloudPolicyStore::Create( |
- Profile* profile, |
+ content::BrowserContext* context, |
scoped_refptr<base::SequencedTaskRunner> background_task_runner) { |
base::FilePath path = |
- profile->GetPath().Append(kPolicyDir).Append(kPolicyCacheFile); |
+ context->GetPath().Append(kPolicyDir).Append(kPolicyCacheFile); |
return make_scoped_ptr( |
- new UserCloudPolicyStore(profile, path, background_task_runner)); |
+ new UserCloudPolicyStore(context, path, background_task_runner)); |
} |
void UserCloudPolicyStore::LoadImmediately() { |
@@ -217,7 +216,8 @@ void UserCloudPolicyStore::Validate( |
scoped_ptr<UserCloudPolicyValidator> validator = CreateValidator( |
policy.Pass(), |
CloudPolicyValidatorBase::TIMESTAMP_NOT_BEFORE); |
- SigninManager* signin = SigninManagerFactory::GetForProfileIfExists(profile_); |
+ SigninManager* signin = |
+ SigninManagerFactory::GetForBrowserContextIfExists(context_); |
Joao da Silva
2013/11/04 10:02:55
This renaming (and the changes to signin_manager_*
|
if (signin) { |
std::string username = signin->GetAuthenticatedUsername(); |
if (username.empty()) |