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

Unified Diff: chrome/browser/download/base_file.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
« no previous file with comments | « chrome/browser/download/base_file.h ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/base_file.cc
===================================================================
--- chrome/browser/download/base_file.cc (revision 91868)
+++ chrome/browser/download/base_file.cc (working copy)
@@ -55,12 +55,10 @@
if (calculate_hash_)
secure_hash_.reset(crypto::SecureHash::Create(crypto::SecureHash::SHA256));
- FilePath save_path =
- download_util::GetDefaultDownloadDirectoryFromPathService();
- if (full_path_.empty() &&
- !file_util::CreateTemporaryFileInDir(save_path, &full_path_))
- return false;
- return Open();
+ if (!full_path_.empty() ||
+ download_util::CreateTemporaryFileForDownload(&full_path_))
+ return Open();
+ return false;
}
bool BaseFile::AppendDataToFile(const char* data, size_t data_len) {
« no previous file with comments | « chrome/browser/download/base_file.h ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698