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

Unified Diff: content/renderer/clipboard_utils.cc

Issue 2658573003: Use explicit WebString conversions in clipboard and drag-and-drop code (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | content/renderer/drop_data_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/clipboard_utils.cc
diff --git a/content/renderer/clipboard_utils.cc b/content/renderer/clipboard_utils.cc
index 37583e49b28c307abbceac3a77471cdf255a5367..a3a69a04de0e6b1d5c51c2cea62384024d2c3a2a 100644
--- a/content/renderer/clipboard_utils.cc
+++ b/content/renderer/clipboard_utils.cc
@@ -17,8 +17,7 @@ std::string URLToMarkup(const blink::WebURL& url,
markup.append(url.string().utf8());
markup.append("\">");
// TODO(darin): HTML escape this
- markup.append(
- net::EscapeForHTML(base::UTF16ToUTF8(base::StringPiece16(title))));
+ markup.append(net::EscapeForHTML(title.utf8()));
markup.append("</a>");
return markup;
}
@@ -30,8 +29,7 @@ std::string URLToImageMarkup(const blink::WebURL& url,
markup.append("\"");
if (!title.isEmpty()) {
markup.append(" alt=\"");
- markup.append(
- net::EscapeForHTML(base::UTF16ToUTF8(base::StringPiece16(title))));
+ markup.append(net::EscapeForHTML(title.utf8()));
markup.append("\"");
}
markup.append("/>");
« no previous file with comments | « no previous file | content/renderer/drop_data_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698