diff options
author | jkummerow@chromium.org <jkummerow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 10:59:08 +0000 |
---|---|---|
committer | jkummerow@chromium.org <jkummerow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 10:59:08 +0000 |
commit | 6ced4e79b6b816022957ca3dbad7712b49aa2f36 (patch) | |
tree | 1ab8d3426c1f5f902745b37d20382a4befdd97f0 /chrome/browser/policy/cloud_policy_controller.h | |
parent | 087b8c8ecf6630ab31d30913148e0e613a0ab881 (diff) | |
download | chromium_src-6ced4e79b6b816022957ca3dbad7712b49aa2f36.zip chromium_src-6ced4e79b6b816022957ca3dbad7712b49aa2f36.tar.gz chromium_src-6ced4e79b6b816022957ca3dbad7712b49aa2f36.tar.bz2 |
Provide backend methods for device enrollment UI
BUG=chromium-os:13277
TEST=Existing unit tests
Review URL: http://codereview.chromium.org/6794022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/cloud_policy_controller.h')
-rw-r--r-- | chrome/browser/policy/cloud_policy_controller.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/chrome/browser/policy/cloud_policy_controller.h b/chrome/browser/policy/cloud_policy_controller.h index 1bc316b..61ff3bb 100644 --- a/chrome/browser/policy/cloud_policy_controller.h +++ b/chrome/browser/policy/cloud_policy_controller.h @@ -35,15 +35,20 @@ class CloudPolicyController public CloudPolicyIdentityStrategy::Observer { public: // Takes ownership of |backend|; the other parameters are weak pointers. - CloudPolicyController(CloudPolicyCacheBase* cache, - DeviceManagementBackend* backend, + CloudPolicyController(DeviceManagementService* service, + CloudPolicyCacheBase* cache, DeviceTokenFetcher* token_fetcher, - CloudPolicyIdentityStrategy* identity_strategy); + CloudPolicyIdentityStrategy* identity_strategy, + PolicyNotifier* notifier); virtual ~CloudPolicyController(); // Sets the refresh rate at which to re-fetch policy information. void SetRefreshRate(int64 refresh_rate_milliseconds); + // Stops all auto-retrying error handling behavior inside the policy + // subsystem. + void StopAutoRetry(); + // DevicePolicyResponseDelegate implementation: virtual void HandlePolicyResponse( const em::DevicePolicyResponse& response); @@ -78,20 +83,22 @@ class CloudPolicyController friend class CloudPolicyControllerTest; // More configurable constructor for use by test cases. - CloudPolicyController(CloudPolicyCacheBase* cache, - DeviceManagementBackend* backend, + CloudPolicyController(DeviceManagementService* service, + CloudPolicyCacheBase* cache, DeviceTokenFetcher* token_fetcher, CloudPolicyIdentityStrategy* identity_strategy, + PolicyNotifier* notifier, int64 policy_refresh_rate_ms, int policy_refresh_deviation_factor_percent, int64 policy_refresh_deviation_max_ms, int64 policy_refresh_error_delay_ms); // Called by constructors to perform shared initialization. - void Initialize(CloudPolicyCacheBase* cache, - DeviceManagementBackend* backend, + void Initialize(DeviceManagementService* service, + CloudPolicyCacheBase* cache, DeviceTokenFetcher* token_fetcher, CloudPolicyIdentityStrategy* identity_strategy, + PolicyNotifier* notifier, int64 policy_refresh_rate_ms, int policy_refresh_deviation_factor_percent, int64 policy_refresh_deviation_max_ms, @@ -104,10 +111,13 @@ class CloudPolicyController // isn't already outstanding. void SendPolicyRequest(); - // Called back from the delayed work task. Performs whatever action is - // required in the current state, e.g. refreshing policy. + // Called back from the delayed work task. Calls |DoWork()|. void DoDelayedWork(); + // Performs whatever action is required in the current state, + // e.g. refreshing policy. + void DoWork(); + // Cancels the delayed work task. void CancelDelayedWork(); @@ -117,12 +127,14 @@ class CloudPolicyController // Computes the policy refresh delay to use. int64 GetRefreshDelay(); + DeviceManagementService* service_; CloudPolicyCacheBase* cache_; - scoped_ptr<DeviceManagementBackend> backend_; CloudPolicyIdentityStrategy* identity_strategy_; DeviceTokenFetcher* token_fetcher_; + scoped_ptr<DeviceManagementBackend> backend_; ControllerState state_; bool initial_fetch_done_; + PolicyNotifier* notifier_; int64 policy_refresh_rate_ms_; int policy_refresh_deviation_factor_percent_; |