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

Unified Diff: base/ref_counted.h

Issue 251012: Assert that thread-safe reference counting is used with... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « base/message_pump_glib_unittest.cc ('k') | base/task.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/ref_counted.h
===================================================================
--- base/ref_counted.h (revision 27287)
+++ base/ref_counted.h (working copy)
@@ -14,6 +14,8 @@
class RefCountedBase {
public:
+ static bool ImplementsThreadSafeReferenceCounting() { return false; }
+
bool HasOneRef() const { return ref_count_ == 1; }
protected:
@@ -38,6 +40,8 @@
class RefCountedThreadSafeBase {
public:
+ static bool ImplementsThreadSafeReferenceCounting() { return true; }
+
bool HasOneRef() const;
protected:
« no previous file with comments | « base/message_pump_glib_unittest.cc ('k') | base/task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698