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

Unified Diff: webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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: webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc b/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc
index ef8bc9cbfe709438e960f41170c72ae323d66946..820c3db9f43302cf0df43a19c4f8980eb6ea47c1 100644
--- a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc
@@ -48,17 +48,11 @@ int32_t PPB_Flash_NetConnector_Impl::ConnectTcp(
if (callback_.get() && !callback_->completed())
return PP_ERROR_INPROGRESS;
- PP_Resource resource_id = GetReferenceNoAddRef();
- if (!resource_id) {
- NOTREACHED();
- return PP_ERROR_FAILED;
- }
-
int32_t rv = instance()->delegate()->ConnectTcp(this, host, port);
if (rv == PP_OK_COMPLETIONPENDING) {
// Record callback and output buffers.
callback_ = new TrackedCompletionCallback(
- instance()->module()->GetCallbackTracker(), resource_id, callback);
+ instance()->module()->GetCallbackTracker(), pp_resource(), callback);
socket_out_ = socket_out;
local_addr_out_ = local_addr_out;
remote_addr_out_ = remote_addr_out;
@@ -87,17 +81,11 @@ int32_t PPB_Flash_NetConnector_Impl::ConnectTcpAddress(
if (callback_.get() && !callback_->completed())
return PP_ERROR_INPROGRESS;
- PP_Resource resource_id = GetReferenceNoAddRef();
- if (!resource_id) {
- NOTREACHED();
- return PP_ERROR_FAILED;
- }
-
int32_t rv = instance()->delegate()->ConnectTcpAddress(this, addr);
if (rv == PP_OK_COMPLETIONPENDING) {
// Record callback and output buffers.
callback_ = new TrackedCompletionCallback(
- instance()->module()->GetCallbackTracker(), resource_id, callback);
+ instance()->module()->GetCallbackTracker(), pp_resource(), callback);
socket_out_ = socket_out;
local_addr_out_ = local_addr_out;
remote_addr_out_ = remote_addr_out;

Powered by Google App Engine
This is Rietveld 408576698