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

Unified Diff: media/base/test_helpers.cc

Issue 2914603002: Replace deprecated base::NonThreadSafe in media in favor of SequenceChecker. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/test_helpers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/test_helpers.cc
diff --git a/media/base/test_helpers.cc b/media/base/test_helpers.cc
index 457892f5acf43cfc8e5b722ea84561cbad73758b..d92dbfd27b6d66ccb9b9d79c002f75a14579dc14 100644
--- a/media/base/test_helpers.cc
+++ b/media/base/test_helpers.cc
@@ -69,29 +69,29 @@ WaitableMessageLoopEvent::WaitableMessageLoopEvent(base::TimeDelta timeout)
: signaled_(false), status_(PIPELINE_OK), timeout_(timeout) {}
WaitableMessageLoopEvent::~WaitableMessageLoopEvent() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
base::Closure WaitableMessageLoopEvent::GetClosure() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return BindToCurrentLoop(base::Bind(
&WaitableMessageLoopEvent::OnCallback, base::Unretained(this),
PIPELINE_OK));
}
PipelineStatusCB WaitableMessageLoopEvent::GetPipelineStatusCB() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return BindToCurrentLoop(base::Bind(
&WaitableMessageLoopEvent::OnCallback, base::Unretained(this)));
}
void WaitableMessageLoopEvent::RunAndWait() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
RunAndWaitForStatus(PIPELINE_OK);
}
void WaitableMessageLoopEvent::RunAndWaitForStatus(PipelineStatus expected) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (signaled_) {
EXPECT_EQ(expected, status_);
return;
@@ -110,7 +110,7 @@ void WaitableMessageLoopEvent::RunAndWaitForStatus(PipelineStatus expected) {
}
void WaitableMessageLoopEvent::OnCallback(PipelineStatus status) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
signaled_ = true;
status_ = status;
@@ -120,7 +120,7 @@ void WaitableMessageLoopEvent::OnCallback(PipelineStatus status) {
}
void WaitableMessageLoopEvent::OnTimeout() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
ADD_FAILURE() << "Timed out waiting for message loop to quit";
run_loop_->Quit();
}
« no previous file with comments | « media/base/test_helpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698