| Index: chrome/browser/policy/cloud_policy_service.h
|
| diff --git a/chrome/browser/policy/cloud_policy_service.h b/chrome/browser/policy/cloud_policy_service.h
|
| index 933c9895cbc46f04fcd149420d0b6a139f5e0e13..43e1c39738c2c815d35025aaa11db8a25ff1afd4 100644
|
| --- a/chrome/browser/policy/cloud_policy_service.h
|
| +++ b/chrome/browser/policy/cloud_policy_service.h
|
| @@ -11,21 +11,20 @@
|
| #include "base/basictypes.h"
|
| #include "base/callback_forward.h"
|
| #include "base/compiler_specific.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "chrome/browser/policy/cloud_policy_client.h"
|
| #include "chrome/browser/policy/cloud_policy_constants.h"
|
| #include "chrome/browser/policy/cloud_policy_store.h"
|
|
|
| namespace policy {
|
|
|
| -// Coordinates cloud policy handling, hosting the cloud policy client, fetching
|
| -// new policy, and updating the local policy cache when new policy becomes
|
| -// available.
|
| +// Coordinates cloud policy handling, moving downloaded policy from the client
|
| +// to the store, and setting up client registrations from cached data in the
|
| +// store. Also coordinates actions on policy refresh triggers.
|
| class CloudPolicyService : public CloudPolicyClient::Observer,
|
| public CloudPolicyStore::Observer {
|
| public:
|
| - CloudPolicyService(scoped_ptr<CloudPolicyClient> client,
|
| - CloudPolicyStore* store);
|
| + // |client| and |store| must remain valid for the object life time.
|
| + CloudPolicyService(CloudPolicyClient* client, CloudPolicyStore* store);
|
| virtual ~CloudPolicyService();
|
|
|
| // Returns the domain that manages this user/device, according to the current
|
| @@ -36,9 +35,6 @@ class CloudPolicyService : public CloudPolicyClient::Observer,
|
| // or aborts because of errors.
|
| void RefreshPolicy(const base::Closure& callback);
|
|
|
| - CloudPolicyClient* client() { return client_.get(); }
|
| - CloudPolicyStore* store() { return store_; }
|
| -
|
| // CloudPolicyClient::Observer:
|
| virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE;
|
| virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE;
|
| @@ -53,7 +49,7 @@ class CloudPolicyService : public CloudPolicyClient::Observer,
|
| void RefreshCompleted();
|
|
|
| // The client used to talk to the cloud.
|
| - scoped_ptr<CloudPolicyClient> client_;
|
| + CloudPolicyClient* client_;
|
|
|
| // Takes care of persisting and decoding cloud policy.
|
| CloudPolicyStore* store_;
|
|
|