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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.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
« no previous file with comments | « base/sync_socket_win.cc ('k') | content/browser/renderer_host/media/audio_input_sync_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 79a0e1241e46f67cddd95bf9b1c03d67410af415..41857bb3e4aa66fc040716699bb3f021112fe70a 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -31,7 +31,7 @@ void LogMessage(int stream_id, const std::string& msg, bool add_prefix) {
DVLOG(1) << oss.str();
}
-}
+} // namespace
namespace content {
@@ -178,16 +178,11 @@ void AudioInputRendererHost::DoCompleteCreation(
AudioInputSyncWriter* writer =
static_cast<AudioInputSyncWriter*>(entry->writer.get());
-#if defined(OS_WIN)
- base::SyncSocket::Handle foreign_socket_handle;
-#else
- base::FileDescriptor foreign_socket_handle;
-#endif
+ base::SyncSocket::TransitDescriptor socket_transit_descriptor;
// If we failed to prepare the sync socket for the renderer then we fail
// the construction of audio input stream.
- if (!writer->PrepareForeignSocketHandle(PeerHandle(),
- &foreign_socket_handle)) {
+ if (!writer->PrepareForeignSocket(PeerHandle(), &socket_transit_descriptor)) {
DeleteEntryOnError(entry, SYNC_SOCKET_ERROR);
return;
}
@@ -196,8 +191,8 @@ void AudioInputRendererHost::DoCompleteCreation(
"DoCompleteCreation: IPC channel and stream are now open",
true);
- Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id,
- foreign_memory_handle, foreign_socket_handle,
+ Send(new AudioInputMsg_NotifyStreamCreated(
+ entry->stream_id, foreign_memory_handle, socket_transit_descriptor,
entry->shared_memory.requested_size(),
entry->shared_memory_segment_count));
}
« no previous file with comments | « base/sync_socket_win.cc ('k') | content/browser/renderer_host/media/audio_input_sync_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698