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

Unified Diff: content/browser/download/base_file.h

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: 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/base_file.h
diff --git a/content/browser/download/base_file.h b/content/browser/download/base_file.h
index 7ada03c7c4c9a0e7ec016c775aeb48531f713bbf..0854f8cf8a537b783345922feb6307b62607534f 100644
--- a/content/browser/download/base_file.h
+++ b/content/browser/download/base_file.h
@@ -29,7 +29,11 @@ class FileStream;
// for DownloadFile and SaveFile, which keep more state information.
class CONTENT_EXPORT BaseFile {
public:
- BaseFile(const FilePath& full_path,
+ // Either |download_directory| or |full_path| should be non-empty. If
+ // |full_path| isn't specified, a temporary file will be created under
+ // |download_directory|.
+ BaseFile(const FilePath& download_directory,
+ const FilePath& full_path,
const GURL& source_url,
const GURL& referrer_url,
int64 received_bytes,
@@ -108,6 +112,9 @@ class CONTENT_EXPORT BaseFile {
static const size_t kSha256HashLen = 32;
static const unsigned char kEmptySha256Hash[kSha256HashLen];
+ // Default download directory to use for temporary file
+ FilePath download_directory_;
Randy Smith (Not in Mondays) 2012/09/14 16:38:16 I'm tempted to suggest that instead of doing this
asanka 2012/09/14 19:11:45 I added a parameter to Initialize() instead and ca
+
// Source URL for the file being downloaded.
GURL source_url_;

Powered by Google App Engine
This is Rietveld 408576698