From e2219171711f7acf49a52ba89eb6e05c27f11103 Mon Sep 17 00:00:00 2001 From: "dsh@google.com" Date: Wed, 25 Feb 2009 19:17:45 +0000 Subject: Change the string_escape functions to use string16 rather than wstring. Review URL: http://codereview.chromium.org/27116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10358 0039d316-1c4b-4281-b951-d872f2087c98 --- base/string_util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'base/string_util.h') diff --git a/base/string_util.h b/base/string_util.h index 6ee079a..500a114 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -181,6 +181,19 @@ string16 UTF8ToUTF16(const std::string& utf8); bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output); std::string UTF16ToUTF8(const string16& utf16); +// We are trying to get rid of wstring as much as possible, but it's too big +// a mess to do it all at once. These conversions should be used when we +// really should just be passing a string16 around, but we haven't finished +// porting whatever module uses wstring and the conversion is being used as a +// stopcock. This makes it easy to grep for the ones that should be removed. +#if defined(OS_WIN) +# define WideToUTF16Hack +# define UTF16ToWideHack +#else +# define WideToUTF16Hack WideToUTF16 +# define UTF16ToWideHack UTF16ToWide +#endif + // Defines the error handling modes of WideToCodepage and CodepageToWide. class OnStringUtilConversionError { public: -- cgit v1.1