Avi Drissman | e4714ce9 | 2022-09-12 21:41:58 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors |
Sam McNally | cfe4cc0 | 2018-05-25 03:49:12 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Henrique Ferreiro | 19781296 | 2022-08-22 23:51:10 | [diff] [blame] | 5 | #ifndef CHROMEOS_ASH_COMPONENTS_DRIVEFS_DRIVEFS_MOJOM_TRAITS_H_ |
| 6 | #define CHROMEOS_ASH_COMPONENTS_DRIVEFS_DRIVEFS_MOJOM_TRAITS_H_ |
Sam McNally | cfe4cc0 | 2018-05-25 03:49:12 | [diff] [blame] | 7 | |
| 8 | #include "base/component_export.h" |
Henrique Ferreiro | 19781296 | 2022-08-22 23:51:10 | [diff] [blame] | 9 | #include "chromeos/ash/components/drivefs/mojom/drivefs.mojom-shared.h" |
Sam McNally | cfe4cc0 | 2018-05-25 03:49:12 | [diff] [blame] | 10 | #include "components/drive/file_errors.h" |
| 11 | #include "mojo/public/cpp/bindings/enum_traits.h" |
| 12 | |
| 13 | namespace mojo { |
| 14 | |
| 15 | template <> |
| 16 | struct COMPONENT_EXPORT(DRIVEFS_MOJOM) |
| 17 | EnumTraits<drivefs::mojom::FileError, drive::FileError> { |
| 18 | static drivefs::mojom::FileError ToMojom(drive::FileError input); |
| 19 | |
| 20 | static bool FromMojom(drivefs::mojom::FileError input, |
| 21 | drive::FileError* output); |
| 22 | }; |
| 23 | |
| 24 | } // namespace mojo |
| 25 | |
Henrique Ferreiro | 19781296 | 2022-08-22 23:51:10 | [diff] [blame] | 26 | #endif // CHROMEOS_ASH_COMPONENTS_DRIVEFS_DRIVEFS_MOJOM_TRAITS_H_ |