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

Unified Diff: chrome/browser/bookmarks/bookmark_drag_data.cc

Issue 194052: Clipboard:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes Created 11 years, 3 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 | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_drag_data.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_drag_data.cc (revision 25821)
+++ chrome/browser/bookmarks/bookmark_drag_data.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/profile.h"
#include "chrome/common/url_constants.h"
#include "chrome/browser/browser_process.h"
+#include "net/base/escape.h"
const char* BookmarkDragData::kClipboardFormatString =
"chromium/x-bookmark-entries";
@@ -96,8 +97,11 @@
// If there is only one element and it is a URL, write the URL to the
// clipboard.
if (elements.size() == 1 && elements[0].is_url) {
- scw.WriteBookmark(WideToUTF16Hack(elements[0].title),
- elements[0].url.spec());
+ string16 title = WideToUTF16Hack(elements[0].title);
+ std::string url = elements[0].url.spec();
+
+ scw.WriteBookmark(title, url);
+ scw.WriteHyperlink(EscapeForHTML(UTF16ToUTF8(title)), url);
}
Pickle pickle;
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698