| Index: sync/notifier/ack_tracker.h
|
| diff --git a/sync/notifier/ack_tracker.h b/sync/notifier/ack_tracker.h
|
| index 1609ac9715b0076fcc97b061eafe1e646daac3d3..f74035bfbccc3e0eca61102a187585bdbb2d72c3 100644
|
| --- a/sync/notifier/ack_tracker.h
|
| +++ b/sync/notifier/ack_tracker.h
|
| @@ -16,6 +16,10 @@
|
| #include "net/base/backoff_entry.h"
|
| #include "sync/notifier/invalidation_util.h"
|
|
|
| +namespace base {
|
| +class TickClock;
|
| +} // namespace base
|
| +
|
| namespace syncer {
|
|
|
| // A simple class that tracks sets of object IDs that have not yet been
|
| @@ -33,11 +37,10 @@ class AckTracker {
|
| virtual void OnTimeout(const ObjectIdSet& ids) = 0;
|
| };
|
|
|
| - typedef base::Callback<base::TimeTicks()> NowCallback;
|
| typedef base::Callback<scoped_ptr<net::BackoffEntry>(
|
| const net::BackoffEntry::Policy* const)> CreateBackoffEntryCallback;
|
|
|
| - explicit AckTracker(Delegate* delegate);
|
| + AckTracker(base::TickClock* tick_clock, Delegate* delegate);
|
| ~AckTracker();
|
|
|
| // Equivalent to calling Ack() on all currently registered object IDs.
|
| @@ -52,7 +55,6 @@ class AckTracker {
|
| void Ack(const ObjectIdSet& ids);
|
|
|
| // Testing methods.
|
| - void SetNowCallbackForTest(const NowCallback& now_callback);
|
| void SetCreateBackoffEntryCallbackForTest(
|
| const CreateBackoffEntryCallback& create_backoff_entry_callback);
|
| // Returns true iff there are no timeouts scheduled to occur before |now|.
|
| @@ -82,9 +84,10 @@ class AckTracker {
|
| const net::BackoffEntry::Policy* const policy);
|
|
|
| // Used for testing purposes.
|
| - NowCallback now_callback_;
|
| CreateBackoffEntryCallback create_backoff_entry_callback_;
|
|
|
| + base::TickClock* const tick_clock_;
|
| +
|
| Delegate* const delegate_;
|
|
|
| base::OneShotTimer<AckTracker> timer_;
|
|
|