OLD | NEW |
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 #include "base/memory/ptr_util.h" |
5 #include "mojo/common/values_struct_traits.h" | 6 #include "mojo/common/values_struct_traits.h" |
6 | 7 |
7 namespace mojo { | 8 namespace mojo { |
8 | 9 |
9 bool StructTraits<common::mojom::ListValueDataView, | 10 bool StructTraits<common::mojom::ListValueDataView, |
10 std::unique_ptr<base::ListValue>>:: | 11 std::unique_ptr<base::ListValue>>:: |
11 Read(common::mojom::ListValueDataView data, | 12 Read(common::mojom::ListValueDataView data, |
12 std::unique_ptr<base::ListValue>* value_out) { | 13 std::unique_ptr<base::ListValue>* value_out) { |
13 mojo::ArrayDataView<common::mojom::ValueDataView> view; | 14 mojo::ArrayDataView<common::mojom::ValueDataView> view; |
14 data.GetValuesDataView(&view); | 15 data.GetValuesDataView(&view); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 if (!data.ReadListValue(&list_value)) | 93 if (!data.ReadListValue(&list_value)) |
93 return false; | 94 return false; |
94 *value_out = std::move(list_value); | 95 *value_out = std::move(list_value); |
95 return true; | 96 return true; |
96 } | 97 } |
97 } | 98 } |
98 return false; | 99 return false; |
99 } | 100 } |
100 | 101 |
101 } // namespace mojo | 102 } // namespace mojo |
OLD | NEW |