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

Unified Diff: content/renderer/pepper_plugin_delegate_impl.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 | « content/browser/renderer_host/media/audio_sync_reader.cc ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 8bc1fb89596aa2ed5f2fc695ee99f66b8c27a685..ffc7fc1960c0092dbff193f32dd4a6e2e3198cf1 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -820,13 +820,11 @@ void PpapiBrokerImpl::ConnectPluginToBroker(
base::SyncSocket::Handle plugin_handle = base::kInvalidPlatformFileValue;
int32_t result = PP_OK;
- base::SyncSocket* sockets[2] = {0};
- if (base::SyncSocket::CreatePair(sockets)) {
- // The socket objects will be deleted when this function exits, closing the
- // handles. Any uses of the socket must duplicate them.
- scoped_ptr<base::SyncSocket> broker_socket(sockets[0]);
- scoped_ptr<base::SyncSocket> plugin_socket(sockets[1]);
-
+ // The socket objects will be deleted when this function exits, closing the
+ // handles. Any uses of the socket must duplicate them.
+ scoped_ptr<base::SyncSocket> broker_socket(new base::SyncSocket());
+ scoped_ptr<base::SyncSocket> plugin_socket(new base::SyncSocket());
+ if (base::SyncSocket::CreatePair(broker_socket.get(), plugin_socket.get())) {
result = dispatcher_->SendHandleToBroker(client->pp_instance(),
broker_socket->handle());
« no previous file with comments | « content/browser/renderer_host/media/audio_sync_reader.cc ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698