Chromium Code Reviews| 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..b0bd5b403030846e4e090555391c61b3ee62bca3 100644 |
| --- a/content/browser/download/save_file.cc |
| +++ b/content/browser/download/save_file.cc |
| @@ -6,12 +6,19 @@ |
| #include "base/logging.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/content_browser_client.h" |
| #include "net/base/file_stream.h" |
| 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 doesn't |
| +// always have access to the SavePackage at this point. |
| SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash) |
| - : file_(FilePath(), |
| + : file_(content::GetContentClient()->browser()-> |
| + GetDefaultDownloadDirectory(), |
|
Randy Smith (Not in Mondays)
2012/09/14 16:38:16
Is this safe to access on the file thread?
asanka
2012/09/14 19:11:45
It's documented as "can be called on any thread."
|
| + FilePath(), |
| info->url, |
| GURL(), |
| 0, |