summaryrefslogtreecommitdiffstats
path: root/base/string_util.h
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 19:17:45 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 19:17:45 +0000
commite2219171711f7acf49a52ba89eb6e05c27f11103 (patch)
tree464c5ec96e0a288bf0460d9d7109d12f9bd29207 /base/string_util.h
parent5e5bf59cbc75839aafef3ae29bcb53408adb715d (diff)
downloadchromium_src-e2219171711f7acf49a52ba89eb6e05c27f11103.zip
chromium_src-e2219171711f7acf49a52ba89eb6e05c27f11103.tar.gz
chromium_src-e2219171711f7acf49a52ba89eb6e05c27f11103.tar.bz2
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
Diffstat (limited to 'base/string_util.h')
-rw-r--r--base/string_util.h13
1 files changed, 13 insertions, 0 deletions
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: