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

Side by Side Diff: content/test/webrtc_audio_device_test.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/test/webrtc_audio_device_test.h" 5 #include "content/test/webrtc_audio_device_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 IPC_END_MESSAGE_MAP_EX() 307 IPC_END_MESSAGE_MAP_EX()
308 308
309 EXPECT_TRUE(message_is_ok); 309 EXPECT_TRUE(message_is_ok);
310 310
311 return true; 311 return true;
312 } 312 }
313 313
314 // Posts a final task to the IO message loop and waits for completion. 314 // Posts a final task to the IO message loop and waits for completion.
315 void WebRTCAudioDeviceTest::WaitForIOThreadCompletion() { 315 void WebRTCAudioDeviceTest::WaitForIOThreadCompletion() {
316 WaitForMessageLoopCompletion( 316 WaitForMessageLoopCompletion(
317 ChildProcess::current()->io_message_loop()->message_loop_proxy()); 317 ChildProcess::current()->io_message_loop()->message_loop_proxy().get());
318 } 318 }
319 319
320 void WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() { 320 void WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() {
321 if (audio_manager_) 321 if (audio_manager_)
322 WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop()); 322 WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop().get());
323 } 323 }
324 324
325 void WebRTCAudioDeviceTest::WaitForMessageLoopCompletion( 325 void WebRTCAudioDeviceTest::WaitForMessageLoopCompletion(
326 base::MessageLoopProxy* loop) { 326 base::MessageLoopProxy* loop) {
327 base::WaitableEvent* event = new base::WaitableEvent(false, false); 327 base::WaitableEvent* event = new base::WaitableEvent(false, false);
328 loop->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal, 328 loop->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal,
329 base::Unretained(event))); 329 base::Unretained(event)));
330 if (event->TimedWait(TestTimeouts::action_max_timeout())) { 330 if (event->TimedWait(TestTimeouts::action_max_timeout())) {
331 delete event; 331 delete event;
332 } else { 332 } else {
(...skipping 25 matching lines...) Expand all
358 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { 358 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) {
359 return network_->ReceivedRTPPacket(channel, data, len); 359 return network_->ReceivedRTPPacket(channel, data, len);
360 } 360 }
361 361
362 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, 362 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data,
363 int len) { 363 int len) {
364 return network_->ReceivedRTCPPacket(channel, data, len); 364 return network_->ReceivedRTCPPacket(channel, data, len);
365 } 365 }
366 366
367 } // namespace content 367 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_url_request_context_getter.cc ('k') | gpu/command_buffer/service/async_pixel_transfer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698