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

Side by Side Diff: mojo/public/cpp/bindings/array_traits.h

Issue 2045723002: mojo ArrayTraits<T>::Resize returns bool indicating success (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_
7 7
8 namespace mojo { 8 namespace mojo {
9 9
10 // This must be specialized for any type |T| to be serialized/deserialized as 10 // This must be specialized for any type |T| to be serialized/deserialized as
(...skipping 14 matching lines...) Expand all
25 // static size_t GetSize(const CustomArray<T>& input); 25 // static size_t GetSize(const CustomArray<T>& input);
26 // 26 //
27 // // These two methods are optional. They are used to access the 27 // // These two methods are optional. They are used to access the
28 // // underlying storage of the array to speed up copy of POD types. 28 // // underlying storage of the array to speed up copy of POD types.
29 // static T* GetData(CustomArray<T>& input); 29 // static T* GetData(CustomArray<T>& input);
30 // static const T* GetData(const CustomArray<T>& input); 30 // static const T* GetData(const CustomArray<T>& input);
31 // 31 //
32 // static T& GetAt(CustomArray<T>& input, size_t index); 32 // static T& GetAt(CustomArray<T>& input, size_t index);
33 // static const T& GetAt(const CustomArray<T>& input, size_t index); 33 // static const T& GetAt(const CustomArray<T>& input, size_t index);
34 // 34 //
35 // static void Resize(CustomArray<T>& input, size_t size); 35 // static bool Resize(CustomArray<T>& input, size_t size);
yzshen1 2016/06/06 21:00:06 Please consider adding comment: Returning false re
Fady Samuel 2016/06/06 22:52:09 Done.
36 // }; 36 // };
37 // 37 //
38 template <typename T> 38 template <typename T>
39 struct ArrayTraits; 39 struct ArrayTraits;
40 40
41 } // namespace mojo 41 } // namespace mojo
42 42
43 #endif // MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_ 43 #endif // MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_H_
OLDNEW
« no previous file with comments | « gpu/ipc/common/mailbox_struct_traits.cc ('k') | mojo/public/cpp/bindings/array_traits_standard.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698