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

Unified Diff: ui/base/dialogs/select_file_dialog_mac.mm

Issue 10915252: Always include base extension type in Mac select file dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dialogs/select_file_dialog_mac.mm
diff --git a/ui/base/dialogs/select_file_dialog_mac.mm b/ui/base/dialogs/select_file_dialog_mac.mm
index e844c937811b8c9203baced25f59a8dfee83a088..0fe1df0287fa5553b45a4c9575f715da6266fa7b 100644
--- a/ui/base/dialogs/select_file_dialog_mac.mm
+++ b/ui/base/dialogs/select_file_dialog_mac.mm
@@ -227,6 +227,11 @@ void SelectFileDialogImpl::SelectFileImpl(
base::mac::ScopedCFTypeRef<CFStringRef> uti(
CreateUTIFromExtension(ext_list[j]));
[file_type_set addObject:base::mac::CFToNSCast(uti.get())];
+
+ // Always allow the extension itself, in case the UTI does not exist.
+ base::mac::ScopedCFTypeRef<CFStringRef> ext_cf(
+ base::SysUTF8ToCFStringRef(ext_list[j]));
+ [file_type_set addObject:base::mac::CFToNSCast(ext_cf.get())];
Avi (use Gerrit) 2012/09/13 05:52:39 UTIs always exist. Dynamic UTIs exist to round-tri
thorogood 2012/09/16 23:50:49 Done, I've attached it to the bug (which I've CC'e
Avi (use Gerrit) 2012/09/17 02:41:45 What The F. Can you link the bug in the comment?
thorogood 2012/09/17 03:19:06 Done, linked to the issue 148840.
}
}
allowed_file_types = [file_type_set allObjects];
« no previous file with comments | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698