Chromium Code Reviews| Index: chrome/browser/policy/device_management_policy_provider.h |
| diff --git a/chrome/browser/policy/device_management_policy_provider.h b/chrome/browser/policy/device_management_policy_provider.h |
| index 274bf6a1e4119489b271b5da1654a6e58f6d9ced..1ab366cda8a01384cf50e85f2dbaa98c2c428a1c 100644 |
| --- a/chrome/browser/policy/device_management_policy_provider.h |
| +++ b/chrome/browser/policy/device_management_policy_provider.h |
| @@ -56,14 +56,8 @@ class DeviceManagementPolicyProvider |
| // server and no response or error has yet been received. |
| bool IsPolicyRequestPending() const { return policy_request_pending_; } |
| - // Returns true if the policy cache is empty and hence no policies are |
| - // available. |
| - bool IsPolicyCacheEmpty() const; |
| - |
| - // Returns true if the device management policy provider has an empty policy |
| - // cache and is waiting for a pending policy request to retrive the inital |
| - // set of policies. If cached policies are available false is returned even in |
| - // the case of a pending policy request. |
| + // Returns true if the device management policy provider is currently waiting |
| + // for the first attempt to fetch policies to complete. |
|
markusheintz_
2010/11/25 17:49:44
Should we mention that the method also returns tru
Jakob Kummerow
2010/11/26 09:17:23
Strictly speaking, yes. But the request is issued
|
| bool WaitingForInitialPolicies() const; |
| // Tells the provider that the passed in token service reference is about to |
| @@ -100,11 +94,20 @@ class DeviceManagementPolicyProvider |
| // Calculates when the next RefreshTask shall be executed. |
| int64 GetRefreshTaskDelay(); |
| + void StopWaitingForInitialPolicies(); |
| + |
| #if defined(OS_CHROMEOS) |
| // Sent a CLOUD_POLICY_UPDATE notification. |
| void NotifyCloudPolicyUpdate() const; |
| #endif |
| + static FilePath GetUnmanagedDeviceMarkerPath(const FilePath& storage_dir); |
| + static void CreateUnmanagedDeviceMarker(const FilePath& storage_dir, |
| + const base::Time& timestamp); |
| + static void DeleteUnmanagedDeviceMarker(const FilePath& storage_dir); |
| + bool UnmanagedDeviceMarkerExists(); |
| + base::Time GetUnmanagedDeviceTimestamp(); |
| + |
| // Provides the URL at which requests are sent to from the device management |
| // backend. |
| static std::string GetDeviceManagementURL(); |
| @@ -127,6 +130,10 @@ class DeviceManagementPolicyProvider |
| void set_token_fetch_error_delay_ms(int64 token_fetch_error_delay_ms) { |
| token_fetch_error_delay_ms_ = token_fetch_error_delay_ms; |
| } |
| + void set_unmanaged_device_refresh_rate_ms( |
| + int64 unmanaged_device_refresh_rate_ms) { |
| + unmanaged_device_refresh_rate_ms_ = unmanaged_device_refresh_rate_ms; |
|
danno
2010/11/25 16:35:01
Can you use a new private/protected constructor fo
Jakob Kummerow
2010/11/26 09:17:23
Done.
|
| + } |
| scoped_ptr<DeviceManagementBackend> backend_; |
| TokenService* token_service_; // weak |
| @@ -136,10 +143,12 @@ class DeviceManagementPolicyProvider |
| FilePath storage_dir_; |
| bool policy_request_pending_; |
| bool refresh_task_pending_; |
| + bool waiting_for_initial_policies_; |
| int64 policy_refresh_rate_ms_; |
| int64 policy_refresh_max_earlier_ms_; |
| int64 policy_refresh_error_delay_ms_; |
| int64 token_fetch_error_delay_ms_; |
| + int64 unmanaged_device_refresh_rate_ms_; |
| DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); |
| }; |