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

Unified Diff: base/utf_string_conversions.cc

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
Index: base/utf_string_conversions.cc
diff --git a/base/utf_string_conversions.cc b/base/utf_string_conversions.cc
index 41a70db9283151f48d957bd6ba0b9233d624f8be..a7802dbcd366dc794fddc19e664570aed2d65416 100644
--- a/base/utf_string_conversions.cc
+++ b/base/utf_string_conversions.cc
@@ -133,7 +133,7 @@ bool UTF8ToUTF16(const char* src, size_t src_len, string16* output) {
return ConvertUnicode(src, src_len, output);
}
-string16 UTF8ToUTF16(const std::string& utf8) {
+string16 UTF8ToUTF16(const base::StringPiece& utf8) {
string16 ret;
// Ignore the success flag of this call, it will do the best it can for
// invalid input, which is what we want here.

Powered by Google App Engine
This is Rietveld 408576698