Chromium Code Reviews| 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..805b1c7be5c2bfbde8878f6661068fabb4f05b1d 100644 |
| --- a/components/bookmarks/browser/bookmark_node_data.cc |
| +++ b/components/bookmarks/browser/bookmark_node_data.cc |
| @@ -179,6 +179,26 @@ void BookmarkNodeData::WriteToClipboard(ui::ClipboardType clipboard_type) { |
| scw.WriteText(base::UTF8ToUTF16(url)); |
| } |
|
sky
2014/10/07 21:58:57
See style guide for handling of else. Basically yo
hichris123
2014/10/08 01:04:28
Done.
|
| + // We have more than one element |
|
sky
2014/10/07 21:58:57
This comment isn't quite right.
hichris123
2014/10/08 01:04:28
Done.
|
| + else { |
| + bool all_urls = true; |
|
sky
2014/10/07 21:58:57
What's the rationale for this logic? Why ignore fo
hichris123
2014/10/07 22:35:55
I just tried not including folders, and it wouldn'
hichris123
2014/10/08 01:04:29
Done.
|
| + for (Element& element : elements) { |
| + if (!element.is_url) { |
| + all_urls = false; |
| + break; |
| + } |
| + } |
| + |
| + if (all_urls == true) { |
|
sky
2014/10/07 21:58:57
No == true here, just if (all_urls)
hichris123
2014/10/08 01:04:28
Done.
|
| + std::string text; |
| + for (size_t i = 0; i < elements.size(); i++) { |
| + const std::string url = elements[i].url.spec(); |
| + text += i == 0 ? url : "\n" + url; |
| + } |
| + scw.WriteText(base::UTF8ToUTF16(text)); |
| + } |
| + } |
| + |
| Pickle pickle; |
| WriteToPickle(base::FilePath(), &pickle); |
| scw.WritePickledData(pickle, |