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

Unified Diff: base/callback_internal.h

Issue 8774032: Add Pass(), which implements move semantics, to scoped_ptr, scoped_array, and scoped_ptr_malloc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small fixes. Created 9 years 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
Index: base/callback_internal.h
diff --git a/base/callback_internal.h b/base/callback_internal.h
index 81c87c0aa749759d9dd987aa16fb0fd3c4e9bdef..92740b725765acbfbd93f83908098290c9d691ef 100644
--- a/base/callback_internal.h
+++ b/base/callback_internal.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include "base/base_export.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
namespace base {
@@ -130,6 +131,15 @@ struct CallbackParamTraits<T[]> {
typedef const T* StorageType;
};
+template <typename T>
+class PassScopedWrapper;
+
+template <typename T>
+struct CallbackParamTraits<scoped_ptr<T> > {
+ typedef const PassScopedWrapper<scoped_ptr<T> >& ForwardType;
+ typedef PassScopedWrapper<scoped_ptr<T> > StorageType;
+};
+
} // namespace internal
} // namespace base
« no previous file with comments | « base/bind_unittest.cc ('k') | base/memory/scoped_ptr.h » ('j') | base/memory/scoped_ptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698