Index: remoting/host/backoff_timer.cc |
diff --git a/remoting/host/backoff_timer.cc b/remoting/host/backoff_timer.cc |
index 16679b5b93f86ba4ac18fb74debef0fa10419845..5f2c07d7c8784b8b9b42a1e66c9d4425f3c5e722 100644 |
--- a/remoting/host/backoff_timer.cc |
+++ b/remoting/host/backoff_timer.cc |
@@ -4,13 +4,13 @@ |
#include "remoting/host/backoff_timer.h" |
+#include <utility> |
+ |
namespace remoting { |
-BackoffTimer::BackoffTimer() : timer_(new base::Timer(false, false)) { |
-} |
+BackoffTimer::BackoffTimer() : timer_(new base::Timer(false, false)) {} |
-BackoffTimer::~BackoffTimer() { |
-} |
+BackoffTimer::~BackoffTimer() {} |
void BackoffTimer::Start(const tracked_objects::Location& posted_from, |
base::TimeDelta delay, |
@@ -33,6 +33,10 @@ void BackoffTimer::Stop() { |
backoff_entry_.reset(); |
}; |
+void BackoffTimer::SetTimerForTest(scoped_ptr<base::Timer> timer) { |
+ timer_ = std::move(timer); |
+} |
+ |
void BackoffTimer::StartTimer() { |
timer_->Start( |
posted_from_, backoff_entry_->GetTimeUntilRelease(), |