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

Unified Diff: services/preferences/public/cpp/preferences_struct_traits.h

Issue 2601873002: Add a mojo bridge for PersistentPrefStore. (Closed)
Patch Set: rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: services/preferences/public/cpp/preferences_struct_traits.h
diff --git a/services/preferences/public/cpp/preferences_struct_traits.h b/services/preferences/public/cpp/preferences_struct_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..40edba3b0174083f7461f66e656a3f5d7bbe9f0a
--- /dev/null
+++ b/services/preferences/public/cpp/preferences_struct_traits.h
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_PREFERENCES_PUBLIC_CPP_PREFERENCES_STRUCT_TRAITS_H_
+#define SERVICES_PREFERENCES_PUBLIC_CPP_PREFERENCES_STRUCT_TRAITS_H_
+
+#include "components/prefs/persistent_pref_store.h"
+#include "mojo/public/cpp/bindings/enum_traits.h"
+#include "services/preferences/public/interfaces/preferences.mojom-shared.h"
+
+namespace mojo {
+
+template <>
+struct EnumTraits<::prefs::mojom::PersistentPrefStoreConnector_ReadError,
+ ::PersistentPrefStore::PrefReadError> {
+ static prefs::mojom::PersistentPrefStoreConnector_ReadError ToMojom(
+ PersistentPrefStore::PrefReadError input);
+
+ static bool FromMojom(
+ prefs::mojom::PersistentPrefStoreConnector_ReadError input,
+ PersistentPrefStore::PrefReadError* output);
+};
+
+} // namespace mojo
+
+#endif // SERVICES_PREFERENCES_PUBLIC_CPP_PREFERENCES_STRUCT_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698