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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm

Issue 2014733003: Removing parsing of text from pasteboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverting everything, except mac. Review mac. Created 4 years, 7 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
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
index 4a120eaf18c940112485ed46e3b6a428ddb135cf..f8be62c2265efd2800be0d65aed22f8ede3667ce 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
@@ -704,12 +704,15 @@ static NSString* UnusedLegalNameForNewDropFile(NSURL* saveLocation,
NSPasteboard* pboard = [NSPasteboard pasteboardWithName:NSDragPboard];
NSFileManager* fileManager = [NSFileManager defaultManager];
- if (![pboard containsURLData])
+ if (![pboard containsURLData:/*convertTextToURL*/ YES])
return NULL;
NSArray *urls = NULL;
NSArray* titles = NULL;
- [pboard getURLs:&urls andTitles:&titles convertingFilenames:YES];
+ [pboard getURLs:&urls
+ andTitles:&titles
+ convertingFilenames:YES
+ convertTextToURL:YES];
NSString* urlStr = [urls objectAtIndex:0];
NSString* nameStr = [titles objectAtIndex:0];

Powered by Google App Engine
This is Rietveld 408576698