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

Unified Diff: base/string_util_icu.cc

Issue 40106: Make UTF8ToWide take a StringPiece, to avoid copying to a std::string. (Closed)
Patch Set: Created 11 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
« base/string_util.h ('K') | « base/string_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util_icu.cc
diff --git a/base/string_util_icu.cc b/base/string_util_icu.cc
index 9036ce69f868311148b2d9623ead8adcb8323e2e..78b8de165adf04075bd1d1d0165d0dfad54763bf 100644
--- a/base/string_util_icu.cc
+++ b/base/string_util_icu.cc
@@ -198,7 +198,7 @@ bool WideToUTF8(const wchar_t* src, size_t src_len, std::string* output) {
return ConvertUnicode<wchar_t, std::string>(src, src_len, output);
}
-std::wstring UTF8ToWide(const std::string& utf8) {
+std::wstring UTF8ToWide(const StringPiece& utf8) {
std::wstring ret;
if (utf8.empty())
return ret;
« base/string_util.h ('K') | « base/string_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698