Chromium Code Reviews| Index: components/bookmarks/browser/bookmark_node_data_views.cc |
| diff --git a/components/bookmarks/browser/bookmark_node_data_views.cc b/components/bookmarks/browser/bookmark_node_data_views.cc |
| index a56c0d2d8423a967c7906e4c30749cd8f8a94b6b..27772a7f7f15373a1cef95973a2a2b922b95af28 100644 |
| --- a/components/bookmarks/browser/bookmark_node_data_views.cc |
| +++ b/components/bookmarks/browser/bookmark_node_data_views.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "base/pickle.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "ui/base/dragdrop/drag_and_drop_url_utils.h" |
| #include "ui/base/dragdrop/os_exchange_data.h" |
| #include "url/url_constants.h" |
| @@ -55,11 +56,10 @@ bool BookmarkNodeData::Read(const ui::OSExchangeData& data) { |
| } |
| } else { |
| // See if there is a URL on the clipboard. |
| - GURL url; |
| - base::string16 title; |
| - if (data.GetURLAndTitle( |
| - ui::OSExchangeData::CONVERT_FILENAMES, &url, &title)) |
| - ReadFromTuple(url, title); |
| + if (auto url_and_title = ui::TryToInterpretAsURL( |
|
dyaroshev
2016/09/14 17:12:05
No checks on the validity of url here, unlike othe
Peter Kasting
2016/09/15 21:26:53
See other replies
|
| + data, ui::OSExchangeData::CONVERT_FILENAMES)) { |
| + ReadFromTuple(url_and_title->first, url_and_title->second); |
| + } |
| } |
| return is_valid(); |