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

Unified Diff: chrome/browser/download/download_manager.cc

Issue 63093: Refactoring; switch the |filter| parameter into something that is more amenab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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/browser.cc ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
===================================================================
--- chrome/browser/download/download_manager.cc (revision 13572)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -640,18 +640,16 @@
WebContents* contents = tab_util::GetWebContentsByID(
info->render_process_id, info->render_view_id);
-#if defined(OS_WIN)
- std::wstring filter =
- win_util::GetFileFilterFromPath(info->suggested_path.value());
-#elif defined(OS_LINUX)
- std::wstring filter;
-#endif
+ SelectFileDialog::FileTypeInfo file_type_info;
+ file_type_info.extensions.resize(1);
+ file_type_info.extensions[0].push_back(info->suggested_path.Extension());
+ file_type_info.include_all_files = true;
gfx::NativeWindow owning_window =
contents ? platform_util::GetTopLevel(contents->GetNativeView()) : NULL;
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
string16(),
info->suggested_path,
- filter, 0, FILE_PATH_LITERAL(""),
+ &file_type_info, 0, FILE_PATH_LITERAL(""),
owning_window, info);
} else {
// No prompting for download, just continue with the suggested name.
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698