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

Unified Diff: content/browser/download/save_file.cc

Issue 10905284: Use the user's preferred downloads directory for creating the initial download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows path check Created 8 years, 3 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: content/browser/download/save_file.cc
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index b4474d10df9700348856e5e3a39be2c22a813619..a5f947b74731bb1ff2a3c4c677c4e00c78f0d77b 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -10,6 +10,10 @@
using content::BrowserThread;
+// TODO(asanka): SaveFile should use the target directory of the save package as
+// the default download directory when initializing |file_|.
+// Unfortunately, as it is, constructors of SaveFile don't always
+// have access to the SavePackage at this point.
SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash)
: file_(FilePath(),
info->url,
@@ -31,7 +35,7 @@ SaveFile::~SaveFile() {
}
net::Error SaveFile::Initialize() {
- return file_.Initialize();
+ return file_.Initialize(FilePath());
}
net::Error SaveFile::AppendDataToFile(const char* data, size_t data_len) {
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698