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

Unified Diff: mojo/common/common_type_converters.h

Issue 209453003: Add support for mojo::TypeConverter to control how convenient conversion should be. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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: mojo/common/common_type_converters.h
diff --git a/mojo/common/common_type_converters.h b/mojo/common/common_type_converters.h
index c8a1ddde386ee77b9cfed7fe378ce8bed18d5169..4fdd04f741c56c8228c4e8f048500f6d295bebcd 100644
--- a/mojo/common/common_type_converters.h
+++ b/mojo/common/common_type_converters.h
@@ -18,6 +18,8 @@ class MOJO_COMMON_EXPORT TypeConverter<String, base::StringPiece> {
public:
static String ConvertFrom(const base::StringPiece& input, Buffer* buf);
static base::StringPiece ConvertTo(const String& input);
+
+ MOJO_ALLOW_DIRECT_TYPE_CONVERSION();
darin (slow to review) 2014/04/23 18:01:01 Why don't you like using the term "implicit" here?
yzshen1 2014/04/23 18:20:57 Because it sounds like we allow "explicit conversi
};
template <>
@@ -25,6 +27,8 @@ class MOJO_COMMON_EXPORT TypeConverter<String, base::string16> {
public:
static String ConvertFrom(const base::string16& input, Buffer* buf);
static base::string16 ConvertTo(const String& input);
+
+ MOJO_ALLOW_DIRECT_TYPE_CONVERSION();
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698