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

Unified Diff: trunk/src/base/callback_internal.h

Issue 14225009: Revert 194649 "Remove scoped_array from Chromium." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | trunk/src/base/memory/scoped_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/callback_internal.h
===================================================================
--- trunk/src/base/callback_internal.h (revision 194652)
+++ trunk/src/base/callback_internal.h (working copy)
@@ -136,6 +136,12 @@
typedef scoped_ptr<T, D> StorageType;
};
+template <typename T>
+struct CallbackParamTraits<scoped_array<T> > {
+ typedef scoped_array<T> ForwardType;
+ typedef scoped_array<T> StorageType;
+};
+
template <typename T, typename R>
struct CallbackParamTraits<scoped_ptr_malloc<T, R> > {
typedef scoped_ptr_malloc<T, R> ForwardType;
@@ -170,6 +176,9 @@
template <typename T, typename D>
scoped_ptr<T, D> CallbackForward(scoped_ptr<T, D>& p) { return p.Pass(); }
+template <typename T>
+scoped_array<T> CallbackForward(scoped_array<T>& p) { return p.Pass(); }
+
template <typename T, typename R>
scoped_ptr_malloc<T, R> CallbackForward(scoped_ptr_malloc<T, R>& p) {
return p.Pass();
« no previous file with comments | « no previous file | trunk/src/base/memory/scoped_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698