Index: ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.cc |
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.cc |
index 1ff697af057090b9ed25ce5547a54007b17d2865..20cfe0c83a5f61e3b237cf104e5ac2cf71596f90 100644 |
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.cc |
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.cc |
@@ -7,6 +7,7 @@ |
#include <limits> |
#include <set> |
+#include "base/basictypes.h" |
#include "native_client/src/include/nacl_macros.h" |
#include "native_client/src/include/portability.h" |
#include "native_client/src/shared/ppapi_proxy/plugin_globals.h" |
@@ -16,6 +17,12 @@ |
namespace ppapi_proxy { |
+// static |
+PluginResourceTracker* PluginResourceTracker::Get() { |
+ CR_DEFINE_STATIC_LOCAL(PluginResourceTracker, tracker, ()); |
noelallen1
2011/11/16 18:22:40
Does this need to be some form of LazyInstance? I
Nico
2011/11/16 18:25:57
No; it's the same as a normal static except that i
|
+ return &tracker; |
+} |
+ |
PluginResourceTracker::ResourceAndRefCounts::ResourceAndRefCounts( |
PluginResource* r, size_t browser_count) |
: resource(r), browser_refcount(browser_count), plugin_refcount(1) { |