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

Unified Diff: content/test/webrtc_audio_device_test.cc

Issue 9255017: Add thread safety to AudioManagerBase to protect access to the audio thread member variable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style issue Created 8 years, 11 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 | « content/test/webrtc_audio_device_test.h ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d4ea8b7d71f15fa33162bb27bd7368f0872ecbd2..68cb8eaecd830fc2cb10354040e8ca0b047ec27e 100644
--- a/content/test/webrtc_audio_device_test.cc
+++ b/content/test/webrtc_audio_device_test.cc
@@ -277,7 +277,8 @@ bool WebRTCAudioDeviceTest::OnMessageReceived(const IPC::Message& message) {
// Posts a final task to the IO message loop and waits for completion.
void WebRTCAudioDeviceTest::WaitForIOThreadCompletion() {
- WaitForMessageLoopCompletion(ChildProcess::current()->io_message_loop());
+ WaitForMessageLoopCompletion(
+ ChildProcess::current()->io_message_loop()->message_loop_proxy());
}
void WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() {
@@ -285,7 +286,8 @@ void WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() {
WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop());
}
-void WebRTCAudioDeviceTest::WaitForMessageLoopCompletion(MessageLoop* loop) {
+void WebRTCAudioDeviceTest::WaitForMessageLoopCompletion(
+ base::MessageLoopProxy* loop) {
base::WaitableEvent* event = new base::WaitableEvent(false, false);
loop->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal,
base::Unretained(event)));
« no previous file with comments | « content/test/webrtc_audio_device_test.h ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698