| Index: chrome/browser/download/download_manager.cc
|
| diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
|
| index 21642efd2c9cce177b4cd6d33b5714d75c6a35c9..e0db75d271a80ed6c8d5badcffe260a45a248ee6 100644
|
| --- a/chrome/browser/download/download_manager.cc
|
| +++ b/chrome/browser/download/download_manager.cc
|
| @@ -660,6 +660,21 @@ void DownloadManager::OnPathExistenceAvailable(DownloadCreateInfo* info) {
|
| if (!file_type_info.extensions[0][0].empty())
|
| file_type_info.extensions[0][0].erase(0, 1); // drop the .
|
| file_type_info.include_all_files = true;
|
| +#if defined(OS_MACOSX)
|
| + // If |contents| is NULL, file selection should theoretically run modeless.
|
| + // FIXME(viettrungluu): But we don't actually currently support modeless
|
| + // file selection dialogs on Mac. Does this ever happen? Should it? Better
|
| + // dcheck it.
|
| + DCHECK(contents);
|
| + select_file_dialog_->SelectFileInTab(SelectFileDialog::SELECT_SAVEAS_FILE,
|
| + string16(),
|
| + info->suggested_path,
|
| + &file_type_info,
|
| + 0,
|
| + FILE_PATH_LITERAL(""),
|
| + contents,
|
| + info);
|
| +#else
|
| gfx::NativeWindow owning_window =
|
| contents ? platform_util::GetTopLevel(contents->GetNativeView()) : NULL;
|
| select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
|
| @@ -667,6 +682,7 @@ void DownloadManager::OnPathExistenceAvailable(DownloadCreateInfo* info) {
|
| info->suggested_path,
|
| &file_type_info, 0, FILE_PATH_LITERAL(""),
|
| owning_window, info);
|
| +#endif
|
| } else {
|
| // No prompting for download, just continue with the suggested name.
|
| ContinueStartDownload(info, info->suggested_path);
|
|
|