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

Unified Diff: base/utf_offset_string_conversions.h

Issue 6898026: Eliminate wstring from base/utf_offset_string_conversions.h, net/base/escape.h, and net/base/net_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | « no previous file | base/utf_offset_string_conversions.cc » ('j') | net/base/net_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/utf_offset_string_conversions.h
===================================================================
--- base/utf_offset_string_conversions.h (revision 82762)
+++ base/utf_offset_string_conversions.h (working copy)
@@ -21,39 +21,23 @@
// will be adjusted to point at the same logical place in the result strings.
// If this isn't possible because an offset points past the end of the source
// strings or into the middle of a multibyte sequence, the offending offset will
-// be set to std::wstring::npos. |offset[s]_for_adjustment| may be NULL.
-BASE_API bool UTF8ToWideAndAdjustOffset(const char* src,
- size_t src_len,
- std::wstring* output,
- size_t* offset_for_adjustment);
-BASE_API bool UTF8ToWideAndAdjustOffsets(
+// be set to string16::npos. |offset[s]_for_adjustment| may be NULL.
+BASE_API bool UTF8ToUTF16AndAdjustOffset(const char* src,
+ size_t src_len,
+ string16* output,
+ size_t* offset_for_adjustment);
+BASE_API bool UTF8ToUTF16AndAdjustOffsets(
const char* src,
size_t src_len,
- std::wstring* output,
+ string16* output,
std::vector<size_t>* offsets_for_adjustment);
-BASE_API std::wstring UTF8ToWideAndAdjustOffset(const base::StringPiece& utf8,
- size_t* offset_for_adjustment);
-BASE_API std::wstring UTF8ToWideAndAdjustOffsets(
+BASE_API string16 UTF8ToUTF16AndAdjustOffset(const base::StringPiece& utf8,
+ size_t* offset_for_adjustment);
+BASE_API string16 UTF8ToUTF16AndAdjustOffsets(
const base::StringPiece& utf8,
std::vector<size_t>* offsets_for_adjustment);
-BASE_API bool UTF16ToWideAndAdjustOffset(const char16* src,
- size_t src_len,
- std::wstring* output,
- size_t* offset_for_adjustment);
-BASE_API bool UTF16ToWideAndAdjustOffsets(
- const char16* src,
- size_t src_len,
- std::wstring* output,
- std::vector<size_t>* offsets_for_adjustment);
-
-BASE_API std::wstring UTF16ToWideAndAdjustOffset(const string16& utf16,
- size_t* offset_for_adjustment);
-BASE_API std::wstring UTF16ToWideAndAdjustOffsets(
- const string16& utf16,
- std::vector<size_t>* offsets_for_adjustment);
-
// Limiting function callable by std::for_each which will replace any value
// which is equal to or greater than |limit| with npos.
template <typename T>
« no previous file with comments | « no previous file | base/utf_offset_string_conversions.cc » ('j') | net/base/net_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698