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

Unified Diff: ui/shell_dialogs/select_file_dialog_mac.mm

Issue 1513413002: Enable "Hide Extension" option when "Save Link As" on the Mac Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 5 years 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 | « content/shell/browser/shell_download_manager_delegate.cc ('k') | ui/shell_dialogs/selected_file_info.h » ('j') | 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 9a4a5fd386792122f0c7d6a3ad1832d97f5f26a9..6ba1f0d1ce74045cdb9b7275c553e1961d57293e 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -21,6 +21,7 @@
#include "base/threading/thread_restrictions.h"
#import "ui/base/cocoa/nib_loading.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#include "ui/shell_dialogs/selected_file_info.h"
#include "ui/strings/grit/ui_strings.h"
namespace {
@@ -150,7 +151,11 @@ void SelectFileDialogImpl::FileWasSelected(
if (is_multi) {
listener_->MultiFilesSelected(files, params);
} else {
- listener_->FileSelected(files[0], index, params);
+ ui::SelectedFileInfo file(files[0], base::FilePath());
+ if ([dialog isExtensionHidden]) {
+ file.SetHideFileExtension(true);
+ }
+ listener_->FileSelectedWithExtraInfo(file, index, params);
}
}
}
« no previous file with comments | « content/shell/browser/shell_download_manager_delegate.cc ('k') | ui/shell_dialogs/selected_file_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698