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

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: addressed micro-nit 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 | « 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
diff --git a/media/audio/win/audio_output_win_unittest.cc b/media/audio/win/audio_output_win_unittest.cc
index 4d5a13c2c5e01efeefcbd762b44e52d86502b614..8a0b31f0614c54b3d57296be66101d30dee05822 100644
--- a/media/audio/win/audio_output_win_unittest.cc
+++ b/media/audio/win/audio_output_win_unittest.cc
@@ -636,7 +636,6 @@ class SyncSocketSource : public AudioOutputStream::AudioSourceCallback {
: socket_(socket) {}
~SyncSocketSource() {
- delete socket_;
}
// AudioSourceCallback::OnMoreData implementation:
@@ -716,16 +715,16 @@ TEST(WinAudioTest, SyncSocketBasic) {
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 @@ TEST(WinAudioTest, SyncSocketBasic) {
::WaitForSingleObject(thread, INFINITE);
::CloseHandle(thread);
- delete sockets[1];
oas->Stop();
oas->Close();
« no previous file with comments | « ipc/sync_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698