| 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..baafcad83a402324923bcc1133fa2d83603f1a46 100644
|
| --- a/chrome/browser/policy/cloud_policy_service.h
|
| +++ b/chrome/browser/policy/cloud_policy_service.h
|
| @@ -18,14 +18,14 @@
|
|
|
| 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 +36,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 +50,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_;
|
|
|