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

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

Issue 2890833002: Adding ThreadChecker validation to d'tors for protocol classes (Closed)
Patch Set: Created 3 years, 7 months 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 encode_time_(kStatisticsWindow), 54 encode_time_(kStatisticsWindow),
55 num_encoding_frames_(0), 55 num_encoding_frames_(0),
56 num_unacknowledged_frames_(0), 56 num_unacknowledged_frames_(0),
57 capture_pending_(false), 57 capture_pending_(false),
58 is_paused_(false), 58 is_paused_(false),
59 next_frame_id_(0) { 59 next_frame_id_(0) {
60 DCHECK(num_of_processors_); 60 DCHECK(num_of_processors_);
61 } 61 }
62 62
63 CaptureScheduler::~CaptureScheduler() { 63 CaptureScheduler::~CaptureScheduler() {
64 DCHECK(thread_checker_.CalledOnValidThread());
64 } 65 }
65 66
66 void CaptureScheduler::Start() { 67 void CaptureScheduler::Start() {
67 DCHECK(thread_checker_.CalledOnValidThread()); 68 DCHECK(thread_checker_.CalledOnValidThread());
68 69
69 ScheduleNextCapture(); 70 ScheduleNextCapture();
70 } 71 }
71 72
72 void CaptureScheduler::Pause(bool pause) { 73 void CaptureScheduler::Pause(bool pause) {
73 DCHECK(thread_checker_.CalledOnValidThread()); 74 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 DCHECK(!is_paused_); 176 DCHECK(!is_paused_);
176 DCHECK(!capture_pending_); 177 DCHECK(!capture_pending_);
177 178
178 capture_pending_ = true; 179 capture_pending_ = true;
179 last_capture_started_time_ = tick_clock_->NowTicks(); 180 last_capture_started_time_ = tick_clock_->NowTicks();
180 capture_closure_.Run(); 181 capture_closure_.Run();
181 } 182 }
182 183
183 } // namespace protocol 184 } // namespace protocol
184 } // namespace remoting 185 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/audio_decode_scheduler.cc ('k') | remoting/protocol/channel_socket_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698