| Index: chrome/browser/download/download_manager.cc
|
| diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
|
| index b9925e73c0ab5a130fb8e9363e8a18b32c908b6b..5a4b6492a1d6df08d127b0f5d6f1d4a38174b4e7 100644
|
| --- a/chrome/browser/download/download_manager.cc
|
| +++ b/chrome/browser/download/download_manager.cc
|
| @@ -679,13 +679,30 @@ 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@gmail.com): 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;
|
| + contents ? platform_util::GetTopLevel(contents->GetNativeView()) : NULL
|
| +
|
| select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
|
| string16(),
|
| 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);
|
|
|