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

Side by Side Diff: remoting/protocol/capture_scheduler.cc

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/capture_scheduler.h" 5 #include "remoting/protocol/capture_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 DCHECK(thread_checker_.CalledOnValidThread()); 120 DCHECK(thread_checker_.CalledOnValidThread());
121 121
122 --num_unacknowledged_frames_; 122 --num_unacknowledged_frames_;
123 DCHECK_GE(num_unacknowledged_frames_, 0); 123 DCHECK_GE(num_unacknowledged_frames_, 0);
124 124
125 ScheduleNextCapture(); 125 ScheduleNextCapture();
126 } 126 }
127 127
128 void CaptureScheduler::SetTickClockForTest( 128 void CaptureScheduler::SetTickClockForTest(
129 scoped_ptr<base::TickClock> tick_clock) { 129 scoped_ptr<base::TickClock> tick_clock) {
130 tick_clock_ = tick_clock.Pass(); 130 tick_clock_ = std::move(tick_clock);
131 } 131 }
132 132
133 void CaptureScheduler::SetTimerForTest(scoped_ptr<base::Timer> timer) { 133 void CaptureScheduler::SetTimerForTest(scoped_ptr<base::Timer> timer) {
134 capture_timer_ = timer.Pass(); 134 capture_timer_ = std::move(timer);
135 } 135 }
136 136
137 void CaptureScheduler::SetNumOfProcessorsForTest(int num_of_processors) { 137 void CaptureScheduler::SetNumOfProcessorsForTest(int num_of_processors) {
138 num_of_processors_ = num_of_processors; 138 num_of_processors_ = num_of_processors;
139 } 139 }
140 140
141 void CaptureScheduler::ScheduleNextCapture() { 141 void CaptureScheduler::ScheduleNextCapture() {
142 DCHECK(thread_checker_.CalledOnValidThread()); 142 DCHECK(thread_checker_.CalledOnValidThread());
143 143
144 if (is_paused_ || capture_pending_ || 144 if (is_paused_ || capture_pending_ ||
(...skipping 29 matching lines...) Expand all
174 DCHECK(!is_paused_); 174 DCHECK(!is_paused_);
175 DCHECK(!capture_pending_); 175 DCHECK(!capture_pending_);
176 176
177 capture_pending_ = true; 177 capture_pending_ = true;
178 last_capture_started_time_ = tick_clock_->NowTicks(); 178 last_capture_started_time_ = tick_clock_->NowTicks();
179 capture_closure_.Run(); 179 capture_closure_.Run();
180 } 180 }
181 181
182 } // namespace protocol 182 } // namespace protocol
183 } // namespace remoting 183 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698