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

Unified Diff: base/utf_string_conversions.h

Issue 380007: Clean up recent string conversion function changes, part 1: Remove unnecessar... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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/i18n/icu_string_conversions_unittest.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
===================================================================
--- base/utf_string_conversions.h (revision 31509)
+++ base/utf_string_conversions.h (working copy)
@@ -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 @@
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 @@
// 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 @@
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);
« no previous file with comments | « base/i18n/icu_string_conversions_unittest.cc ('k') | base/utf_string_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698