OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 5 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/public/common/url_constants.h" | 10 #include "content/public/common/url_constants.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 Pickle drag_data_pickle; | 49 Pickle drag_data_pickle; |
50 if (data.GetPickledData(GetBookmarkCustomFormat(), &drag_data_pickle)) { | 50 if (data.GetPickledData(GetBookmarkCustomFormat(), &drag_data_pickle)) { |
51 if (!ReadFromPickle(&drag_data_pickle)) | 51 if (!ReadFromPickle(&drag_data_pickle)) |
52 return false; | 52 return false; |
53 } | 53 } |
54 } else { | 54 } else { |
55 // See if there is a URL on the clipboard. | 55 // See if there is a URL on the clipboard. |
56 Element element; | 56 Element element; |
57 GURL url; | 57 GURL url; |
58 base::string16 title; | 58 base::string16 title; |
59 if (data.GetURLAndTitle(&url, &title)) | 59 if (data.GetURLAndTitle( |
| 60 ui::OSExchangeData::CONVERT_FILENAMES, &url, &title)) |
60 ReadFromTuple(url, title); | 61 ReadFromTuple(url, title); |
61 } | 62 } |
62 | 63 |
63 return is_valid(); | 64 return is_valid(); |
64 } | 65 } |
OLD | NEW |