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

Unified Diff: ppapi/proxy/ppb_buffer_proxy.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: Assertion fixed 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: ppapi/proxy/ppb_buffer_proxy.cc
diff --git a/ppapi/proxy/ppb_buffer_proxy.cc b/ppapi/proxy/ppb_buffer_proxy.cc
index 558b5316cd5cf6fb30e41c7b040791d53d4001b0..9598a4f2e94e5412223e0548b83942b18e6ee1f7 100644
--- a/ppapi/proxy/ppb_buffer_proxy.cc
+++ b/ppapi/proxy/ppb_buffer_proxy.cc
@@ -20,6 +20,7 @@
#include "ppapi/thunk/thunk.h"
using ppapi::HostResource;
+using ppapi::Resource;
namespace pp {
namespace proxy {
@@ -36,7 +37,7 @@ InterfaceProxy* CreateBufferProxy(Dispatcher* dispatcher,
Buffer::Buffer(const HostResource& resource,
const base::SharedMemoryHandle& shm_handle,
uint32_t size)
- : PluginResource(resource),
+ : Resource(resource),
shm_(shm_handle, false),
size_(size),
mapped_data_(NULL),
@@ -114,8 +115,7 @@ PP_Resource PPB_Buffer_Proxy::AddProxyResource(
const HostResource& resource,
base::SharedMemoryHandle shm_handle,
uint32_t size) {
- return PluginResourceTracker::GetInstance()->AddResource(
- new Buffer(resource, shm_handle, size));
+ return (new Buffer(resource, shm_handle, size))->GetReference();
}
bool PPB_Buffer_Proxy::OnMessageReceived(const IPC::Message& msg) {

Powered by Google App Engine
This is Rietveld 408576698