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

Unified Diff: chrome/test/chromedriver/chrome/zip_reader.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 | « base/strings/utf_string_conversions.cc ('k') | net/cert/x509_cert_types_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/zip_reader.cc
diff --git a/chrome/test/chromedriver/chrome/zip_reader.cc b/chrome/test/chromedriver/chrome/zip_reader.cc
index 218c8d7e77d57f0a297541b08d2f85695ae0b4e8..87623be115447f1729263b2d9bc2a002ac7ac0d2 100644
--- a/chrome/test/chromedriver/chrome/zip_reader.cc
+++ b/chrome/test/chromedriver/chrome/zip_reader.cc
@@ -39,9 +39,10 @@ ZipReader::EntryInfo::EntryInfo(const std::string& file_name_in_zip,
is_unsafe_ = file_name_in_zip.find("..") != std::string::npos;
// We also consider that the file name is unsafe, if it's invalid UTF-8.
- string16 file_name_utf16;
- if (!UTF8ToUTF16(file_name_in_zip.data(), file_name_in_zip.size(),
- &file_name_utf16)) {
+ base::string16 file_name_utf16;
+ if (!base::UTF8ToUTF16(
+ base::StringPiece(file_name_in_zip.data(), file_name_in_zip.size()),
+ &file_name_utf16)) {
is_unsafe_ = true;
}
« no previous file with comments | « base/strings/utf_string_conversions.cc ('k') | net/cert/x509_cert_types_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698