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

Unified Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 525313002: SyncSocket Transit Descriptor - refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits done - Prelanding checks Created 6 years, 3 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
Index: content/browser/renderer_host/media/audio_renderer_host_unittest.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index e87b8251546181887360d7cdf6b69583a44f0954..286e1e72f0061af39e1a2a607427d72bd97cec73 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -101,14 +101,9 @@ class MockAudioRendererHost : public AudioRendererHost {
return true;
}
- void OnNotifyStreamCreated(int stream_id,
- base::SharedMemoryHandle handle,
-#if defined(OS_WIN)
- base::SyncSocket::Handle socket_handle,
-#else
- base::FileDescriptor socket_descriptor,
-#endif
- uint32 length) {
+ void OnNotifyStreamCreated(
+ int stream_id, base::SharedMemoryHandle handle,
+ base::SyncSocket::TransitDescriptor socket_descriptor, uint32 length) {
// Maps the shared memory.
shared_memory_.reset(new base::SharedMemory(handle, false));
CHECK(shared_memory_->Map(length));
@@ -116,12 +111,8 @@ class MockAudioRendererHost : public AudioRendererHost {
shared_memory_length_ = length;
// Create the SyncSocket using the handle.
- base::SyncSocket::Handle sync_socket_handle;
-#if defined(OS_WIN)
- sync_socket_handle = socket_handle;
-#else
- sync_socket_handle = socket_descriptor.fd;
-#endif
+ base::SyncSocket::Handle sync_socket_handle =
+ base::SyncSocket::UnwrapHandle(socket_descriptor);
sync_socket_.reset(new base::SyncSocket(sync_socket_handle));
// And then delegate the call to the mock method.
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | content/browser/renderer_host/media/audio_sync_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698