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

Unified Diff: chrome/browser/policy/cloud_policy_service.cc

Issue 10449071: Enable user policy handling through the new cloud policy stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 6 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_policy_service.cc
diff --git a/chrome/browser/policy/cloud_policy_service.cc b/chrome/browser/policy/cloud_policy_service.cc
index d97ff25bffc58a3a64253c0fbf11d947d2096a3e..8784e888637592f1016f5b1e28df8c7b9880dfc1 100644
--- a/chrome/browser/policy/cloud_policy_service.cc
+++ b/chrome/browser/policy/cloud_policy_service.cc
@@ -12,12 +12,16 @@ namespace em = enterprise_management;
namespace policy {
CloudPolicyService::CloudPolicyService(scoped_ptr<CloudPolicyClient> client,
- scoped_ptr<CloudPolicyStore> store)
+ CloudPolicyStore* store)
: client_(client.Pass()),
- store_(store.Pass()),
+ store_(store),
refresh_state_(REFRESH_NONE) {
client_->AddObserver(this);
store_->AddObserver(this);
+
+ // Make sure we initialize |client_| from the policy data that might be
+ // already present in |store_|.
+ OnStoreLoaded(store_);
}
CloudPolicyService::~CloudPolicyService() {
« no previous file with comments | « chrome/browser/policy/cloud_policy_service.h ('k') | chrome/browser/policy/cloud_policy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698