summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authordimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 18:18:20 +0000
committerdimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 18:18:20 +0000
commit2403fd6476afd05baed46b26b698ce305a351787 (patch)
tree87324fc7ded19e77f66fefccf81da8ac56fc600d /chrome/browser/download
parent4b167a328d35583af35e865e8fcd40dafcb9a55a (diff)
downloadchromium_src-2403fd6476afd05baed46b26b698ce305a351787.zip
chromium_src-2403fd6476afd05baed46b26b698ce305a351787.tar.gz
chromium_src-2403fd6476afd05baed46b26b698ce305a351787.tar.bz2
Default to FOLDERID_Downloads on Windows Vista/7 when safe.
Landing for DCheng@. Codereview: http://codereview.chromium.org/553040 TEST=none BUG=13610 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_manager.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index c0b9e82..6bbdd93 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -337,6 +337,12 @@ void DownloadManager::RegisterUserPrefs(PrefService* prefs) {
&default_download_path)) {
NOTREACHED();
}
+ if (DownloadPathIsDangerous(default_download_path)) {
+ if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS_SAFE,
+ &default_download_path)) {
+ NOTREACHED();
+ }
+ }
prefs->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
default_download_path);