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

Unified Diff: media/audio/win/audio_output_win_unittest.cc

Issue 8965053: Implement support for a cancelable SyncSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix merges 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
« base/sync_socket_win.cc ('K') | « ipc/sync_socket_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_output_win_unittest.cc
===================================================================
--- media/audio/win/audio_output_win_unittest.cc (revision 118668)
+++ media/audio/win/audio_output_win_unittest.cc (working copy)
@@ -636,7 +636,6 @@
: socket_(socket) {}
~SyncSocketSource() {
- delete socket_;
}
// AudioSourceCallback::OnMoreData implementation:
@@ -716,16 +715,16 @@
ASSERT_TRUE(oas->Open());
- base::SyncSocket* sockets[2];
- ASSERT_TRUE(base::SyncSocket::CreatePair(sockets));
+ base::SyncSocket sockets[2];
+ ASSERT_TRUE(base::SyncSocket::CreatePair(&sockets[0], &sockets[1]));
- SyncSocketSource source(sockets[0]);
+ SyncSocketSource source(&sockets[0]);
SyncThreadContext thread_context;
thread_context.sample_rate = sample_rate;
thread_context.sine_freq = 200.0;
thread_context.packet_size_bytes = kSamples20ms * 2;
- thread_context.socket = sockets[1];
+ thread_context.socket = &sockets[1];
HANDLE thread = ::CreateThread(NULL, 0, SyncSocketThread,
&thread_context, 0, NULL);
@@ -734,7 +733,6 @@
::WaitForSingleObject(thread, INFINITE);
::CloseHandle(thread);
- delete sockets[1];
oas->Stop();
oas->Close();
« base/sync_socket_win.cc ('K') | « ipc/sync_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698