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

Unified Diff: base/memory/ref_counted.h

Issue 1087083002: [Not for review] scoped_refptr move benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | base/memory/ref_counted.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/ref_counted.h
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h
index 5f94b4c37ae2eb510176b585b30a9af20e216d32..ea37e8417a05a3981ff88ab3a19d4ab7357d5bb3 100644
--- a/base/memory/ref_counted.h
+++ b/base/memory/ref_counted.h
@@ -437,4 +437,16 @@ std::ostream& operator<<(std::ostream& out, const scoped_refptr<T>& p) {
return out << p.get();
}
+class ThreadUnsafe : public base::RefCounted<ThreadUnsafe> {
+ private:
+ friend class base::RefCounted<ThreadUnsafe>;
+};
+class ThreadSafe : public base::RefCountedThreadSafe<ThreadSafe> {
+ private:
+ friend class base::RefCountedThreadSafe<ThreadSafe>;
+};
+
+scoped_refptr<ThreadUnsafe> get_thread_unsafe();
+scoped_refptr<ThreadSafe> get_thread_safe();
+
#endif // BASE_MEMORY_REF_COUNTED_H_
« no previous file with comments | « no previous file | base/memory/ref_counted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698