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

Unified Diff: chrome/browser/ui/download/download_tab_helper.cc

Issue 7324031: Revert 91861 - When the download folder does not exist, change the download folder to a user's "D... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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
Index: chrome/browser/ui/download/download_tab_helper.cc
===================================================================
--- chrome/browser/ui/download/download_tab_helper.cc (revision 91868)
+++ chrome/browser/ui/download/download_tab_helper.cc (working copy)
@@ -54,6 +54,9 @@
dlm->DownloadUrl(url, tab_contents()->GetURL(), "", tab_contents());
}
+// Used in automated testing to bypass prompting the user for file names.
+// Instead, the names and paths are hard coded rather than running them through
+// file name sanitation and extension / mime checking.
bool DownloadTabHelper::SavePage(const FilePath& main_file,
const FilePath& dir_path,
SavePackage::SavePackageType save_type) {
@@ -62,23 +65,9 @@
save_package_ =
new SavePackage(tab_contents_wrapper_, save_type, main_file, dir_path);
- // Skips GetSaveInfo() and directly calls Init().
- // We do not have to explicitly disable the select file dialog
- // since we skip the process that can show the dialog.
return save_package_->Init();
}
-string16 DownloadTabHelper::SavePageBasedOnDefaultPrefs() {
- tab_contents()->Stop();
-
- save_package_ = new SavePackage(tab_contents_wrapper_);
- // Disables the select file dialog.
- save_package_->SetShouldPromptUser(false);
- // This GetSaveInfo() calls save_package_->Init() in the background.
- save_package_->GetSaveInfo();
- return tab_contents()->GetTitle();
-}
-
bool DownloadTabHelper::CanDownload(int request_id) {
if (delegate_)
return delegate_->CanDownload(request_id);
« no previous file with comments | « chrome/browser/ui/download/download_tab_helper.h ('k') | chrome/browser/ui/webui/options/advanced_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698