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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.mm

Issue 2014733003: Removing parsing of text from pasteboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compilation fix Created 4 years, 6 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 | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.mm
index 5ba26895c67f6114aa0b3f2f11423aabf58f7d1b..e2c8c93464b017ce5bfa6ecde59560705954fdde 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.mm
@@ -61,7 +61,7 @@ using bookmarks::BookmarkNode;
dataForType:ui::ClipboardUtil::UTIForPasteboardType(
kBookmarkButtonDragType)] ||
bookmarks::PasteboardContainsBookmarks(ui::CLIPBOARD_TYPE_DRAG) ||
- [[info draggingPasteboard] containsURLData]) {
+ [[info draggingPasteboard] containsURLDataConvertingTextToURL:YES]) {
// Find the position of the drop indicator.
BOOL showIt = [[self controller]
shouldShowIndicatorShownForPoint:[info draggingLocation]];
@@ -131,11 +131,14 @@ using bookmarks::BookmarkNode;
// performDragOperation: for URLs.
- (BOOL)performDragOperationForURL:(id<NSDraggingInfo>)info {
NSPasteboard* pboard = [info draggingPasteboard];
- DCHECK([pboard containsURLData]);
+ DCHECK([pboard containsURLDataConvertingTextToURL:YES]);
NSArray* urls = nil;
NSArray* titles = nil;
- [pboard getURLs:&urls andTitles:&titles convertingFilenames:YES];
+ [pboard getURLs:&urls
+ andTitles:&titles
+ convertingFilenames:YES
+ convertingTextToURL:YES];
return [[self controller] addURLs:urls
withTitles:titles
@@ -187,7 +190,8 @@ using bookmarks::BookmarkNode;
kBookmarkButtonDragType)] &&
[self performDragOperationForBookmarkButton:info])
return YES;
- if ([pboard containsURLData] && [self performDragOperationForURL:info])
+ if ([pboard containsURLDataConvertingTextToURL:YES] &&
+ [self performDragOperationForURL:info])
return YES;
return NO;
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698