Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Unified Diff: remoting/host/backoff_timer.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: include <utility> Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/backoff_timer.h ('k') | remoting/host/cast_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « remoting/host/backoff_timer.h ('k') | remoting/host/cast_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698