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

Unified Diff: chrome/browser/download/download_prefs.cc

Issue 6973052: When the download folder does not exist, change the download folder to a user's "Downloads" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove PathServiceWrapper and add DefaultDownloadDirectory Created 9 years, 6 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/download/download_prefs.cc
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
index e9e0b7681d696fe9685943a79cbe45a17994d675..6fd62e8d362f94481e4f35aecc4c76b1433a3898 100644
--- a/chrome/browser/download/download_prefs.cc
+++ b/chrome/browser/download/download_prefs.cc
@@ -61,8 +61,9 @@ void DownloadPrefs::RegisterUserPrefs(PrefService* prefs) {
PrefService::UNSYNCABLE_PREF);
// The default download path is userprofile\download.
- const FilePath& default_download_path =
- download_util::GetDefaultDownloadDirectory();
+ FilePath default_download_path;
+ if (!download_util::DefaultDownloadDirectory::Get(&default_download_path))
+ VLOG(1) << "Cannot find the user's \"Downloads\" folder.";
prefs->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
default_download_path,
PrefService::UNSYNCABLE_PREF);

Powered by Google App Engine
This is Rietveld 408576698