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

Unified Diff: mojo/converters/base/base_type_converters.h

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 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
« no previous file with comments | « mojo/converters/base/BUILD.gn ('k') | mojo/converters/base/base_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/base/base_type_converters.h
diff --git a/mojo/converters/base/base_type_converters.h b/mojo/converters/base/base_type_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..c83bc900e1690d62b83c859dffe2cb07c87b18f3
--- /dev/null
+++ b/mojo/converters/base/base_type_converters.h
@@ -0,0 +1,38 @@
+// Copyright 2015 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 MOJO_CONVERTERS_BASE_BASE_TYPE_CONVERTERS_H_
+#define MOJO_CONVERTERS_BASE_BASE_TYPE_CONVERTERS_H_
+
+#include "base/strings/string16.h"
+#include "base/strings/string_piece.h"
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/string.h"
+#include "mojo/public/cpp/bindings/type_converter.h"
+
+namespace mojo {
+
+template <>
+struct TypeConverter<String, base::StringPiece> {
+ static String Convert(const base::StringPiece& input);
+};
+
+template <>
+struct TypeConverter<base::StringPiece, String> {
+ static base::StringPiece Convert(const String& input);
+};
+
+template <>
+struct TypeConverter<String, base::string16> {
+ static String Convert(const base::string16& input);
+};
+
+template <>
+struct TypeConverter<base::string16, String> {
+ static base::string16 Convert(const String& input);
+};
+
+} // namespace mojo
+
+#endif // MOJO_CONVERTERS_BASE_BASE_TYPE_CONVERTERS_H_
« no previous file with comments | « mojo/converters/base/BUILD.gn ('k') | mojo/converters/base/base_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698