OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_PREFERENCES_PUBLIC_CPP_PREFERENCES_STRUCT_TRAITS_H_ |
| 6 #define SERVICES_PREFERENCES_PUBLIC_CPP_PREFERENCES_STRUCT_TRAITS_H_ |
| 7 |
| 8 #include "components/prefs/pref_value_store.h" |
| 9 #include "mojo/public/cpp/bindings/enum_traits.h" |
| 10 #include "services/preferences/public/interfaces/preferences.mojom-shared.h" |
| 11 |
| 12 namespace mojo { |
| 13 |
| 14 template <> |
| 15 struct EnumTraits<::prefs::mojom::PrefStoreType, |
| 16 ::PrefValueStore::PrefStoreType> { |
| 17 static prefs::mojom::PrefStoreType ToMojom( |
| 18 PrefValueStore::PrefStoreType input); |
| 19 |
| 20 static bool FromMojom(prefs::mojom::PrefStoreType input, |
| 21 PrefValueStore::PrefStoreType* output); |
| 22 }; |
| 23 |
| 24 } // namespace mojo |
| 25 |
| 26 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PREFERENCES_STRUCT_TRAITS_H_ |
OLD | NEW |