Index: net/url_request/url_request_throttler_test_support.h |
diff --git a/net/url_request/url_request_throttler_test_support.h b/net/url_request/url_request_throttler_test_support.h |
index a7103336c10159542d14334a673eac1af7c4c10f..76587618f194f135dd282df637350988cad33ffd 100644 |
--- a/net/url_request/url_request_throttler_test_support.h |
+++ b/net/url_request/url_request_throttler_test_support.h |
@@ -7,24 +7,24 @@ |
#include <string> |
+#include "base/time/tick_clock.h" |
#include "base/time/time.h" |
#include "net/base/backoff_entry.h" |
#include "net/url_request/url_request_throttler_header_interface.h" |
namespace net { |
-class MockBackoffEntry : public BackoffEntry { |
+class TestTickClock : public base::TickClock { |
public: |
- explicit MockBackoffEntry(const BackoffEntry::Policy* const policy); |
- ~MockBackoffEntry() override; |
+ TestTickClock(); |
+ explicit TestTickClock(base::TimeTicks now); |
+ ~TestTickClock() override; |
- // BackoffEntry overrides. |
- base::TimeTicks ImplGetTimeNow() const override; |
- |
- void set_fake_now(const base::TimeTicks& now); |
+ base::TimeTicks NowTicks() override; |
+ void set_now(base::TimeTicks now) { now_ticks_ = now; } |
private: |
- base::TimeTicks fake_now_; |
+ base::TimeTicks now_ticks_; |
mmenke
2015/04/10 15:50:43
DISALLOW_COPY_AND_ASSIGN? (+ include base/macros.
johnme
2015/04/10 16:23:36
Done.
|
}; |
// Mocks the URLRequestThrottlerHeaderInterface, allowing testing code to |