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

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: Rebase and fix merges 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
Index: content/renderer/pepper_plugin_delegate_impl.cc
===================================================================
--- content/renderer/pepper_plugin_delegate_impl.cc (revision 118668)
+++ content/renderer/pepper_plugin_delegate_impl.cc (working copy)
@@ -820,13 +820,11 @@
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());

Powered by Google App Engine
This is Rietveld 408576698