diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 19:10:18 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 19:10:18 +0000 |
commit | c37cc3ed715ab40a2ef2d328fe3fda31adfd8781 (patch) | |
tree | 781036e84a8840ec84fa18f5e3a1c339df1e2800 /base/callback_internal.h | |
parent | 1716058100e9511c206a8ec3dcbd4c34c52fdb6a (diff) | |
download | chromium_src-c37cc3ed715ab40a2ef2d328fe3fda31adfd8781.zip chromium_src-c37cc3ed715ab40a2ef2d328fe3fda31adfd8781.tar.gz chromium_src-c37cc3ed715ab40a2ef2d328fe3fda31adfd8781.tar.bz2 |
Revert 194649 "Remove scoped_array from Chromium."
> Remove scoped_array from Chromium.
>
> C++11 provides unique_ptr<T[]>, and Chromium has implemented
> scoped_ptr<T[]> to match its behavior during the transition period. As a
> result, scoped_array<T> is now redundant and is being removed.
>
> BUG=171111
>
> Review URL: https://codereview.chromium.org/14081006
TBR=dcheng@chromium.org
Review URL: https://codereview.chromium.org/14225009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/callback_internal.h')
-rw-r--r-- | base/callback_internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base/callback_internal.h b/base/callback_internal.h index 5993824..d9aba39 100644 --- a/base/callback_internal.h +++ b/base/callback_internal.h @@ -136,6 +136,12 @@ struct CallbackParamTraits<scoped_ptr<T, D> > { 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 @@ T& CallbackForward(T& t) { return t; } 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(); |