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

Unified Diff: net/cert/x509_cert_types_mac.cc

Issue 109863003: Use StringPiece for UTF string conversions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « chrome/test/chromedriver/chrome/zip_reader.cc ('k') | net/dns/dns_config_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_cert_types_mac.cc
diff --git a/net/cert/x509_cert_types_mac.cc b/net/cert/x509_cert_types_mac.cc
index 6439c7f3e77391df933b614dd9edda871f1249a2..9dee2b3fb80d02b217a7ba7fa016625f84368146 100644
--- a/net/cert/x509_cert_types_mac.cc
+++ b/net/cert/x509_cert_types_mac.cc
@@ -125,7 +125,7 @@ bool UTF16BigEndianToUTF8(base::char16* chars, size_t length,
std::string* out_string) {
for (size_t i = 0; i < length; i++)
chars[i] = EndianU16_BtoN(chars[i]);
- return UTF16ToUTF8(chars, length, out_string);
+ return UTF16ToUTF8(base::StringPiece16(chars, length), out_string);
}
// Converts big-endian UTF-32 to UTF-8 in a std::string.
« no previous file with comments | « chrome/test/chromedriver/chrome/zip_reader.cc ('k') | net/dns/dns_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698