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

Unified Diff: ui/shell_dialogs/select_file_dialog_mac.mm

Issue 634833003: mac: Zip packages when they are selected by the file opener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use AppendRelativePath(). Created 6 years, 2 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/test/data/file_select_helper/CalculatorFake.app/Contents/version.plist ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/shell_dialogs/select_file_dialog_mac.mm
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index 3844b06da6aca038eabd03bef4d9fac08baef553..a5d42f884269dbb52e205cc8c979065fcaf1ce6c 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -75,8 +75,6 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
const std::vector<base::FilePath>& files,
int index);
- bool ShouldEnableFilename(NSSavePanel* dialog, NSString* filename);
-
protected:
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
@@ -159,16 +157,6 @@ void SelectFileDialogImpl::FileWasSelected(
}
}
-bool SelectFileDialogImpl::ShouldEnableFilename(NSSavePanel* dialog,
- NSString* filename) {
- // If this is a single/multiple open file dialog, disable selecting packages.
- if (type_map_[dialog] != SELECT_OPEN_FILE &&
- type_map_[dialog] != SELECT_OPEN_MULTI_FILE)
- return true;
-
- return ![[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename];
-}
-
void SelectFileDialogImpl::SelectFileImpl(
Type type,
const base::string16& title,
@@ -427,9 +415,7 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() {
}
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url {
- if (![url isFileURL])
- return NO;
- return selectFileDialogImpl_->ShouldEnableFilename(sender, [url path]);
+ return [url isFileURL];
}
@end
« no previous file with comments | « chrome/test/data/file_select_helper/CalculatorFake.app/Contents/version.plist ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698