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

Unified Diff: base/utf_string_conversions.h

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « apps/app_host/update.cc ('k') | base/utf_string_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/utf_string_conversions.h
diff --git a/base/utf_string_conversions.h b/base/utf_string_conversions.h
index 5a391faecaeb0fa0428a675e3ca2bc52df77dc5c..83cd03b675ef40cd7987fc14347e4f74fdd03b54 100644
--- a/base/utf_string_conversions.h
+++ b/base/utf_string_conversions.h
@@ -11,6 +11,8 @@
#include "base/string16.h"
#include "base/string_piece.h"
+namespace base {
+
// These convert between UTF-8, -16, and -32 strings. They are potentially slow,
// so avoid unnecessary conversions. The low-level versions return a boolean
// indicating whether the conversion was 100% valid. In this case, it will still
@@ -55,4 +57,23 @@ BASE_EXPORT std::string UTF16ToUTF8(const string16& utf16);
BASE_EXPORT std::wstring ASCIIToWide(const base::StringPiece& ascii);
BASE_EXPORT string16 ASCIIToUTF16(const base::StringPiece& ascii);
+} // namespace base
+
+// TODO(brettw) remove these usings once all code has been converted to using
+// the namespaces.
+using base::WideToUTF8;
+using base::WideToUTF8;
+using base::UTF8ToWide;
+using base::UTF8ToWide;
+using base::WideToUTF16;
+using base::WideToUTF16;
+using base::UTF16ToWide;
+using base::UTF16ToWide;
+using base::UTF8ToUTF16;
+using base::UTF8ToUTF16;
+using base::UTF16ToUTF8;
+using base::UTF16ToUTF8;
+using base::ASCIIToWide;
+using base::ASCIIToUTF16;
+
#endif // BASE_UTF_STRING_CONVERSIONS_H_
« no previous file with comments | « apps/app_host/update.cc ('k') | base/utf_string_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698