| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_ |
| 6 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_ |
| 7 | 7 |
| 8 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.h" | 8 #include "mojo/public/cpp/bindings/lib/array_internal.h" |
| 9 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h" | 9 #include "mojo/public/cpp/bindings/lib/map_data_internal.h" |
| 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/map_internal.h" | 10 #include "mojo/public/cpp/bindings/lib/map_internal.h" |
| 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/string_serialization
.h" | 11 #include "mojo/public/cpp/bindings/lib/string_serialization.h" |
| 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/map.h" | 12 #include "mojo/public/cpp/bindings/map.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 | 15 |
| 16 template <typename Key, typename Value> | 16 template <typename Key, typename Value> |
| 17 inline size_t GetSerializedSize_(const Map<Key, Value>& input); | 17 inline size_t GetSerializedSize_(const Map<Key, Value>& input); |
| 18 | 18 |
| 19 template <typename ValidateParams, typename E, typename F> | 19 template <typename ValidateParams, typename E, typename F> |
| 20 inline void SerializeArray_( | 20 inline void SerializeArray_( |
| 21 Array<E> input, | 21 Array<E> input, |
| 22 internal::Buffer* buf, | 22 internal::Buffer* buf, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 Deserialize_(input->values.ptr, &values); | 172 Deserialize_(input->values.ptr, &values); |
| 173 | 173 |
| 174 *output = Map<MapKey, MapValue>(keys.Pass(), values.Pass()); | 174 *output = Map<MapKey, MapValue>(keys.Pass(), values.Pass()); |
| 175 } else { | 175 } else { |
| 176 output->reset(); | 176 output->reset(); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace mojo | 180 } // namespace mojo |
| 181 | 181 |
| 182 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H
_ | 182 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_ |
| OLD | NEW |