| Index: components/bookmarks/browser/bookmark_node_data.cc
|
| diff --git a/components/bookmarks/browser/bookmark_node_data.cc b/components/bookmarks/browser/bookmark_node_data.cc
|
| index 8d0d1430d459eabccf34bf733897a5503642eaf8..2ed7de80b4c6bb48a6f5be7c3a185a6bba50502c 100644
|
| --- a/components/bookmarks/browser/bookmark_node_data.cc
|
| +++ b/components/bookmarks/browser/bookmark_node_data.cc
|
| @@ -177,6 +177,21 @@ void BookmarkNodeData::WriteToClipboard(ui::ClipboardType clipboard_type) {
|
| // on Linux (on Windows and Mac, there is no difference between these
|
| // functions).
|
| scw.WriteText(base::UTF8ToUTF16(url));
|
| + } else {
|
| + // We have either more than one URL, a folder, or a combination of URLs
|
| + // and folders.
|
| + base::string16 text;
|
| + for (size_t i = 0; i < elements.size(); i++) {
|
| + if (!elements[i].is_url) {
|
| + // Then it's a folder. Only copy the name of the folder.
|
| + const base::string16 title = elements[i].title;
|
| + text += i == 0 ? title : base::ASCIIToUTF16("\n") + title;
|
| + } else {
|
| + const base::string16 url = base::UTF8ToUTF16(elements[i].url.spec());
|
| + text += i == 0 ? url : base::ASCIIToUTF16("\n") + url;
|
| + }
|
| + }
|
| + scw.WriteText(text);
|
| }
|
|
|
| Pickle pickle;
|
|
|