summaryrefslogtreecommitdiffstats
path: root/base/utf_string_conversions.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 01:43:15 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 01:43:15 +0000
commit2500a0f7c4ac54a55d621069dc044ddc6702a518 (patch)
tree960a571bb2b49c9005fd152138e4398df9072854 /base/utf_string_conversions.h
parent0d435eae98fbe4f8055215a7aa6c483b07b7fa03 (diff)
downloadchromium_src-2500a0f7c4ac54a55d621069dc044ddc6702a518.zip
chromium_src-2500a0f7c4ac54a55d621069dc044ddc6702a518.tar.gz
chromium_src-2500a0f7c4ac54a55d621069dc044ddc6702a518.tar.bz2
Clean up recent string conversion function changes, part 1: Remove unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used.
This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/utf_string_conversions.h')
-rw-r--r--base/utf_string_conversions.h30
1 files changed, 4 insertions, 26 deletions
diff --git a/base/utf_string_conversions.h b/base/utf_string_conversions.h
index 323233b..7069f83 100644
--- a/base/utf_string_conversions.h
+++ b/base/utf_string_conversions.h
@@ -15,12 +15,6 @@
// string. If this isn't possible because it points past the end of the source
// string or into the middle of a multibyte sequence, it will be set to
// std::wstring::npos. |offset_for_adjustment| may be NULL.
-bool WideToUTF8AndAdjustOffset(const wchar_t* src,
- size_t src_len,
- std::string* output,
- size_t* offset_for_adjustment);
-std::string WideToUTF8AndAdjustOffset(const std::wstring& wide,
- size_t* offset_for_adjustment);
bool UTF8ToWideAndAdjustOffset(const char* src,
size_t src_len,
std::wstring* output,
@@ -28,12 +22,6 @@ bool UTF8ToWideAndAdjustOffset(const char* src,
std::wstring UTF8ToWideAndAdjustOffset(const base::StringPiece& utf8,
size_t* offset_for_adjustment);
-bool WideToUTF16AndAdjustOffset(const wchar_t* src,
- size_t src_len,
- string16* output,
- size_t* offset_for_adjustment);
-string16 WideToUTF16AndAdjustOffset(const std::wstring& wide,
- size_t* offset_for_adjustment);
bool UTF16ToWideAndAdjustOffset(const char16* src,
size_t src_len,
std::wstring* output,
@@ -54,14 +42,8 @@ std::wstring UTF16ToWideAndAdjustOffset(const string16& utf16,
// the Unicode replacement character or adding |replacement_char| parameter.
// Currently, it's skipped in the ouput, which could be problematic in
// some situations.
-inline bool WideToUTF8(const wchar_t* src,
- size_t src_len,
- std::string* output) {
- return WideToUTF8AndAdjustOffset(src, src_len, output, NULL);
-}
-inline std::string WideToUTF8(const std::wstring& wide) {
- return WideToUTF8AndAdjustOffset(wide, NULL);
-}
+bool WideToUTF8(const wchar_t* src, size_t src_len, std::string* output);
+std::string WideToUTF8(const std::wstring& wide);
inline bool UTF8ToWide(const char* src, size_t src_len, std::wstring* output) {
return UTF8ToWideAndAdjustOffset(src, src_len, output, NULL);
}
@@ -69,12 +51,8 @@ inline std::wstring UTF8ToWide(const base::StringPiece& utf8) {
return UTF8ToWideAndAdjustOffset(utf8, NULL);
}
-inline bool WideToUTF16(const wchar_t* src, size_t src_len, string16* output) {
- return WideToUTF16AndAdjustOffset(src, src_len, output, NULL);
-}
-inline string16 WideToUTF16(const std::wstring& wide) {
- return WideToUTF16AndAdjustOffset(wide, NULL);
-}
+bool WideToUTF16(const wchar_t* src, size_t src_len, string16* output);
+string16 WideToUTF16(const std::wstring& wide);
inline bool UTF16ToWide(const char16* src, size_t src_len,
std::wstring* output) {
return UTF16ToWideAndAdjustOffset(src, src_len, output, NULL);