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

Unified Diff: ui/base/clipboard/clipboard_win.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 | « third_party/zlib/google/zip_reader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_win.cc
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 92632c74a965bc59388b3bab595fa13a358a6883..05cdee9c2e6632316ca48c2814b2b26870579d8e 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -227,8 +227,8 @@ void Clipboard::WriteObjects(ClipboardType type, const ObjectMap& objects) {
}
void Clipboard::WriteText(const char* text_data, size_t text_len) {
- string16 text;
- UTF8ToUTF16(text_data, text_len, &text);
+ base::string16 text =
+ base::UTF8ToUTF16(base::StringPiece(text_data, text_len));
HGLOBAL glob = CreateGlobalData(text);
WriteToClipboard(CF_UNICODETEXT, glob);
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698