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

Unified Diff: content/browser/renderer_host/media/audio_input_sync_writer.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_input_sync_writer.cc
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index 6babb49790bc2f7c8d90ba205dd79c96d1b0ef0f..987fd23205485749acca5d804659400ee7f107e3 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -107,27 +107,11 @@ bool AudioInputSyncWriter::Init() {
foreign_socket_.get());
}
-#if defined(OS_WIN)
-
-bool AudioInputSyncWriter::PrepareForeignSocketHandle(
- base::ProcessHandle process_handle,
- base::SyncSocket::Handle* foreign_handle) {
- ::DuplicateHandle(GetCurrentProcess(), foreign_socket_->handle(),
- process_handle, foreign_handle,
- 0, FALSE, DUPLICATE_SAME_ACCESS);
- return (*foreign_handle != 0);
-}
-
-#else
-
-bool AudioInputSyncWriter::PrepareForeignSocketHandle(
+bool AudioInputSyncWriter::PrepareForeignSocket(
base::ProcessHandle process_handle,
- base::FileDescriptor* foreign_handle) {
- foreign_handle->fd = foreign_socket_->handle();
- foreign_handle->auto_close = false;
- return (foreign_handle->fd != -1);
+ base::SyncSocket::TransitDescriptor* descriptor) {
+ return foreign_socket_->PrepareTransitDescriptor(process_handle, descriptor);
}
-#endif
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698