Index: chrome/browser/policy/cloud_policy_refresh_scheduler.h |
diff --git a/chrome/browser/policy/cloud_policy_refresh_scheduler.h b/chrome/browser/policy/cloud_policy_refresh_scheduler.h |
index e2ecb6edc9659fc37eea582e93fa5976c16a104c..f47d3722cc0675440ef51334db548eba2679a517 100644 |
--- a/chrome/browser/policy/cloud_policy_refresh_scheduler.h |
+++ b/chrome/browser/policy/cloud_policy_refresh_scheduler.h |
@@ -11,7 +11,6 @@ |
#include "base/cancelable_callback.h" |
#include "base/memory/ref_counted.h" |
#include "base/time.h" |
-#include "chrome/browser/api/prefs/pref_member.h" |
#include "chrome/browser/policy/cloud_policy_client.h" |
#include "chrome/browser/policy/cloud_policy_store.h" |
#include "net/base/network_change_notifier.h" |
@@ -32,6 +31,7 @@ class CloudPolicyRefreshScheduler |
public net::NetworkChangeNotifier::IPAddressObserver { |
public: |
// Refresh constants. |
+ static const int64 kDefaultRefreshDelayMs; |
static const int64 kUnmanagedRefreshDelayMs; |
static const int64 kInitialErrorRetryDelayMs; |
@@ -44,11 +44,12 @@ class CloudPolicyRefreshScheduler |
CloudPolicyRefreshScheduler( |
CloudPolicyClient* client, |
CloudPolicyStore* store, |
- PrefService* prefs, |
- const std::string& refresh_pref, |
const scoped_refptr<base::TaskRunner>& task_runner); |
virtual ~CloudPolicyRefreshScheduler(); |
+ // Sets the refresh delay to |refresh_delay| (subject to min/max clamping). |
+ void SetRefreshDelay(int64 refresh_delay); |
+ |
// CloudPolicyClient::Observer: |
virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; |
virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; |
@@ -98,7 +99,8 @@ class CloudPolicyRefreshScheduler |
// Error retry delay in milliseconds. |
int64 error_retry_delay_ms_; |
- IntegerPrefMember refresh_delay_; |
+ // The refresh delay. |
+ int64 refresh_delay_ms_; |
DISALLOW_COPY_AND_ASSIGN(CloudPolicyRefreshScheduler); |
}; |