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

Unified Diff: base/strings/utf_string_conversions.h

Issue 102993018: Remove UTF string conversion functions from the global namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aaaaaaaaaa Created 7 years 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 | « base/strings/string_util.cc ('k') | base/test/test_file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/utf_string_conversions.h
diff --git a/base/strings/utf_string_conversions.h b/base/strings/utf_string_conversions.h
index 3461aa491df0abb9b08be5dee91eb6f83d9997a1..fa245ea0b45a001d2866500eee9ead8f2ea5149b 100644
--- a/base/strings/utf_string_conversions.h
+++ b/base/strings/utf_string_conversions.h
@@ -39,19 +39,6 @@ BASE_EXPORT bool UTF16ToUTF8(const char16* src, size_t src_len,
std::string* output);
BASE_EXPORT 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
-
// These convert an ASCII string, typically a hardcoded constant, to a
// UTF16/Wide string.
BASE_EXPORT std::wstring ASCIIToWide(const StringPiece& ascii);
@@ -59,14 +46,12 @@ BASE_EXPORT string16 ASCIIToUTF16(const StringPiece& ascii);
} // namespace base
-// TODO(brettw) remove these when callers are fixed up.
-using base::WideToUTF8;
-using base::UTF8ToWide;
-using base::WideToUTF16;
-using base::UTF16ToWide;
-using base::UTF8ToUTF16;
-using base::UTF16ToUTF8;
-using base::ASCIIToWide;
-using base::ASCIIToUTF16;
+// 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 synonyms 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 stopgap.
+// This makes it easy to grep for the ones that should be removed.
+#define WideToUTF16Hack WideToUTF16
+#define UTF16ToWideHack UTF16ToWide
#endif // BASE_STRINGS_UTF_STRING_CONVERSIONS_H_
« no previous file with comments | « base/strings/string_util.cc ('k') | base/test/test_file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698