OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_CONTROLLER_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_CONTROLLER_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... | |
38 CloudPolicyController(DeviceManagementService* service, | 38 CloudPolicyController(DeviceManagementService* service, |
39 CloudPolicyCacheBase* cache, | 39 CloudPolicyCacheBase* cache, |
40 DeviceTokenFetcher* token_fetcher, | 40 DeviceTokenFetcher* token_fetcher, |
41 CloudPolicyIdentityStrategy* identity_strategy, | 41 CloudPolicyIdentityStrategy* identity_strategy, |
42 PolicyNotifier* notifier); | 42 PolicyNotifier* notifier); |
43 virtual ~CloudPolicyController(); | 43 virtual ~CloudPolicyController(); |
44 | 44 |
45 // Sets the refresh rate at which to re-fetch policy information. | 45 // Sets the refresh rate at which to re-fetch policy information. |
46 void SetRefreshRate(int64 refresh_rate_milliseconds); | 46 void SetRefreshRate(int64 refresh_rate_milliseconds); |
47 | 47 |
48 // Sets wether the policy fetching should not be started immediately after | |
49 // token fetch. This flag auto-resets itself. | |
50 void StopAfterTokenFetch(bool enabled); | |
Mattias Nissler (ping if slow)
2011/04/19 12:15:25
Let's go through the identity strategy, which is d
| |
51 | |
48 // Triggers an immediate retry of of the current operation. | 52 // Triggers an immediate retry of of the current operation. |
49 void Retry(); | 53 void Retry(); |
50 | 54 |
51 // Stops all auto-retrying error handling behavior inside the policy | 55 // Stops all auto-retrying error handling behavior inside the policy |
52 // subsystem. | 56 // subsystem. |
53 void StopAutoRetry(); | 57 void StopAutoRetry(); |
54 | 58 |
55 // DevicePolicyResponseDelegate implementation: | 59 // DevicePolicyResponseDelegate implementation: |
56 virtual void HandlePolicyResponse( | 60 virtual void HandlePolicyResponse( |
57 const em::DevicePolicyResponse& response); | 61 const em::DevicePolicyResponse& response); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 | 133 |
130 // Computes the policy refresh delay to use. | 134 // Computes the policy refresh delay to use. |
131 int64 GetRefreshDelay(); | 135 int64 GetRefreshDelay(); |
132 | 136 |
133 DeviceManagementService* service_; | 137 DeviceManagementService* service_; |
134 CloudPolicyCacheBase* cache_; | 138 CloudPolicyCacheBase* cache_; |
135 CloudPolicyIdentityStrategy* identity_strategy_; | 139 CloudPolicyIdentityStrategy* identity_strategy_; |
136 DeviceTokenFetcher* token_fetcher_; | 140 DeviceTokenFetcher* token_fetcher_; |
137 scoped_ptr<DeviceManagementBackend> backend_; | 141 scoped_ptr<DeviceManagementBackend> backend_; |
138 ControllerState state_; | 142 ControllerState state_; |
139 bool initial_fetch_done_; | 143 bool stop_after_token_fetch_; |
140 PolicyNotifier* notifier_; | 144 PolicyNotifier* notifier_; |
141 | 145 |
142 int64 policy_refresh_rate_ms_; | 146 int64 policy_refresh_rate_ms_; |
143 int policy_refresh_deviation_factor_percent_; | 147 int policy_refresh_deviation_factor_percent_; |
144 int64 policy_refresh_deviation_max_ms_; | 148 int64 policy_refresh_deviation_max_ms_; |
145 int64 policy_refresh_error_delay_ms_; | 149 int64 policy_refresh_error_delay_ms_; |
146 int64 effective_policy_refresh_error_delay_ms_; | 150 int64 effective_policy_refresh_error_delay_ms_; |
147 | 151 |
148 CancelableTask* delayed_work_task_; | 152 CancelableTask* delayed_work_task_; |
149 ScopedRunnableMethodFactory<CloudPolicyController> method_factory_; | 153 ScopedRunnableMethodFactory<CloudPolicyController> method_factory_; |
150 | 154 |
151 DISALLOW_COPY_AND_ASSIGN(CloudPolicyController); | 155 DISALLOW_COPY_AND_ASSIGN(CloudPolicyController); |
152 }; | 156 }; |
153 | 157 |
154 } // namespace policy | 158 } // namespace policy |
155 | 159 |
156 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_CONTROLLER_H_ | 160 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_CONTROLLER_H_ |
OLD | NEW |