| 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..61a7c69b3d6749521996580d5a40fa1f9842ab96 100644
|
| --- a/chrome/browser/policy/cloud_policy_refresh_scheduler.h
|
| +++ b/chrome/browser/policy/cloud_policy_refresh_scheduler.h
|
| @@ -5,19 +5,14 @@
|
| #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_REFRESH_SCHEDULER_H_
|
| #define CHROME_BROWSER_POLICY_CLOUD_POLICY_REFRESH_SCHEDULER_H_
|
|
|
| -#include <string>
|
| -
|
| #include "base/basictypes.h"
|
| #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"
|
|
|
| -class PrefService;
|
| -
|
| namespace base {
|
| class TaskRunner;
|
| }
|
| @@ -32,6 +27,7 @@ class CloudPolicyRefreshScheduler
|
| public net::NetworkChangeNotifier::IPAddressObserver {
|
| public:
|
| // Refresh constants.
|
| + static const int64 kDefaultRefreshDelayMs;
|
| static const int64 kUnmanagedRefreshDelayMs;
|
| static const int64 kInitialErrorRetryDelayMs;
|
|
|
| @@ -44,11 +40,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;
|
| @@ -80,9 +77,6 @@ class CloudPolicyRefreshScheduler
|
| // relative to |last_refresh_|.
|
| void RefreshAfter(int delta_ms);
|
|
|
| - // Gets the refresh delay in milliseconds, clamped to the allowed bounds.
|
| - int64 GetRefreshDelay();
|
| -
|
| CloudPolicyClient* client_;
|
| CloudPolicyStore* store_;
|
|
|
| @@ -98,7 +92,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);
|
| };
|
|
|