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

Unified Diff: base/string_util.cc

Issue 3076013: Move ASCIIToWide and ASCIIToUTF16 to utf_string_conversions.h. I've found it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
Index: base/string_util.cc
===================================================================
--- base/string_util.cc (revision 54020)
+++ base/string_util.cc (working copy)
@@ -25,6 +25,7 @@
#include "base/singleton.h"
#include "base/third_party/dmg_fp/dmg_fp.h"
#include "base/utf_string_conversion_utils.h"
+#include "base/utf_string_conversions.h"
#include "base/third_party/icu/icu_utf.h"
namespace {
@@ -653,21 +654,11 @@
return std::string(wide.begin(), wide.end());
}
-std::wstring ASCIIToWide(const base::StringPiece& ascii) {
- DCHECK(IsStringASCII(ascii)) << ascii;
- return std::wstring(ascii.begin(), ascii.end());
-}
-
std::string UTF16ToASCII(const string16& utf16) {
DCHECK(IsStringASCII(utf16)) << utf16;
return std::string(utf16.begin(), utf16.end());
}
-string16 ASCIIToUTF16(const base::StringPiece& ascii) {
- DCHECK(IsStringASCII(ascii)) << ascii;
- return string16(ascii.begin(), ascii.end());
-}
-
// Latin1 is just the low range of Unicode, so we can copy directly to convert.
bool WideToLatin1(const std::wstring& wide, std::string* latin1) {
std::string output;
« no previous file with comments | « base/string_util.h ('k') | base/utf_string_conversions.h » ('j') | base/utf_string_conversions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698