summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-28 00:44:12 +0000
committerjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-28 00:44:12 +0000
commitcbc43fc87b9db405002eef9c769b39a192c4147c (patch)
tree8ace41a10ee5cff16b11443ea00ded9b23f61394 /chrome/browser/download
parent6de892232d348bc86167e0b9a984d0ffa3b4c5b6 (diff)
downloadchromium_src-cbc43fc87b9db405002eef9c769b39a192c4147c.zip
chromium_src-cbc43fc87b9db405002eef9c769b39a192c4147c.tar.gz
chromium_src-cbc43fc87b9db405002eef9c769b39a192c4147c.tar.bz2
Do not localize the name of 'download' directory. Chrome's UI languages can be
changed and a user will be confused as to where her download goes. Add DIR_DEFAULT_DOWNLOADS to chrome_paths (which is set to 'Downloads' under DIR_USER_DOCUMENTS) and use that in both save_package and download_manager. This patch does not offer a migration path. BUG=3097 TEST=Switch Chrome's UI to non-English and download a file. The file should be downloaded to '..\My Documents\Downloads' rather than '..\My Documents\<'Downloads' in that language>. Review URL: http://codereview.chromium.org/7945 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_manager.cc5
-rw-r--r--chrome/browser/download/save_package.cc6
2 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 23af781..402fab1 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -294,11 +294,10 @@ void DownloadManager::RegisterUserPrefs(PrefService* prefs) {
// The default download path is userprofile\download.
std::wstring default_download_path;
- if (!PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_download_path)) {
+ if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
+ &default_download_path)) {
NOTREACHED();
}
- file_util::AppendToPath(&default_download_path,
- l10n_util::GetString(IDS_DOWNLOAD_DIRECTORY));
prefs->RegisterStringPref(prefs::kDownloadDefaultDirectory,
default_download_path);
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index b8bfc12..3e206c8 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -889,9 +889,9 @@ std::wstring SavePackage::GetSuggestNameForSaveAs(PrefService* prefs,
// If not, initialize it with default directory.
if (!prefs->IsPrefRegistered(prefs::kSaveFileDefaultDirectory)) {
std::wstring default_save_path;
- PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_save_path);
- file_util::AppendToPath(&default_save_path,
- l10n_util::GetString(IDS_DOWNLOAD_DIRECTORY));
+ if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
+ &default_save_path))
+ NOTREACHED();
prefs->RegisterStringPref(prefs::kSaveFileDefaultDirectory,
default_save_path);
}