Index: base/utf_string_conversions.h |
=================================================================== |
--- base/utf_string_conversions.h (revision 54020) |
+++ base/utf_string_conversions.h (working copy) |
@@ -48,4 +48,18 @@ |
# define UTF16ToWideHack UTF16ToWide |
#endif |
+// These convert an ASCII string, typically a hardcoded constant, to a |
+// UTF16/Wide string. |
+// |
+// Note that this doesn't use StringPiece because it's very common to need |
+// ASCIIToUTF16("foo"), and either we have to include it in this file, or |
+// forward declare it and force all callers to include string_piece.h. Given |
+// that string_piece brings in complicated stuff like <algorithm>, it's |
+// easier to just duplicate these very simple definitions for the two calling |
+// cases we actually use. |
+std::wstring ASCIIToWide(const char* ascii); |
+std::wstring ASCIIToWide(const std::string& ascii); |
+string16 ASCIIToUTF16(const char* ascii); |
+string16 ASCIIToUTF16(const std::string& ascii); |
+ |
#endif // BASE_UTF_STRING_CONVERSIONS_H_ |