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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.cc

Issue 8574027: Remove 1 exit time destructor from ppapi, and possibly fix a bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | « ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/plugin_resource_tracker.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698