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

Unified Diff: content/test/webrtc_audio_device_test.cc

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: content/test/webrtc_audio_device_test.cc
diff --git a/content/test/webrtc_audio_device_test.cc b/content/test/webrtc_audio_device_test.cc
index 605713acda3dd17ae398f597820fb7926b05ed31..58ac117df81ab35bbe8197a038ebd99916cd7053 100644
--- a/content/test/webrtc_audio_device_test.cc
+++ b/content/test/webrtc_audio_device_test.cc
@@ -8,7 +8,6 @@
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
@@ -393,20 +392,21 @@ bool MAYBE_WebRTCAudioDeviceTest::OnMessageReceived(
// Posts a final task to the IO message loop and waits for completion.
void MAYBE_WebRTCAudioDeviceTest::WaitForIOThreadCompletion() {
- WaitForMessageLoopCompletion(
- ChildProcess::current()->io_message_loop()->message_loop_proxy().get());
+ WaitForTaskRunnerCompletion(
+ ChildProcess::current()->io_message_loop()->message_loop_proxy());
}
void MAYBE_WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() {
if (audio_manager_)
- WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop().get());
+ WaitForTaskRunnerCompletion(audio_manager_->GetTaskRunner());
}
-void MAYBE_WebRTCAudioDeviceTest::WaitForMessageLoopCompletion(
- base::MessageLoopProxy* loop) {
+void MAYBE_WebRTCAudioDeviceTest::WaitForTaskRunnerCompletion(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
base::WaitableEvent* event = new base::WaitableEvent(false, false);
- loop->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal,
- base::Unretained(event)));
+ task_runner->PostTask(
+ FROM_HERE,
+ base::Bind(&base::WaitableEvent::Signal, base::Unretained(event)));
if (event->TimedWait(TestTimeouts::action_max_timeout())) {
delete event;
} else {

Powered by Google App Engine
This is Rietveld 408576698