summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_file_manager.cc2
-rw-r--r--chrome/browser/download/download_manager.cc11
-rw-r--r--chrome/browser/download/download_manager_unittest.cc4
3 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/download/download_file_manager.cc b/chrome/browser/download/download_file_manager.cc
index 05b8147..dc8fdbd 100644
--- a/chrome/browser/download/download_file_manager.cc
+++ b/chrome/browser/download/download_file_manager.cc
@@ -317,7 +317,7 @@ void DownloadFileManager::OnIntermediateDownloadName(
// There are 3 possible rename cases where this method can be called:
// 1. tmp -> foo (need_delete_crdownload=T)
// 2. foo.crdownload -> foo (need_delete_crdownload=F)
-// 3. tmp-> unconfirmed.xxx.crdownload (need_delete_crdownload=F)
+// 3. tmp-> Unconfirmed.xxx.crdownload (need_delete_crdownload=F)
void DownloadFileManager::OnFinalDownloadName(
int id, const FilePath& full_path, bool need_delete_crdownload,
DownloadManager* download_manager) {
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 9e47b35..24acf1d 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -333,10 +333,19 @@ void DownloadManager::CheckIfSuggestedPathExists(DownloadCreateInfo* info,
// download.
FilePath::StringType file_name;
FilePath path;
+#if defined(OS_WIN)
+ string16 unconfirmed_prefix =
+ l10n_util::GetStringUTF16(IDS_DOWNLOAD_UNCONFIRMED_PREFIX);
+#else
+ std::string unconfirmed_prefix =
+ l10n_util::GetStringUTF8(IDS_DOWNLOAD_UNCONFIRMED_PREFIX);
+#endif
+
while (path.empty()) {
base::SStringPrintf(
&file_name,
- FILE_PATH_LITERAL("unconfirmed %d.crdownload"),
+ unconfirmed_prefix.append(
+ FILE_PATH_LITERAL(" %d.crdownload")).c_str(),
base::RandInt(0, 100000));
path = dir.Append(file_name);
if (file_util::PathExists(path))
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index 2db13be..610fb98 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -166,7 +166,7 @@ const struct {
1, },
// Dangerous download, download finishes BEFORE rename.
// Needs to be renamed only once.
- { FILE_PATH_LITERAL("unconfirmed xxx.crdownload"),
+ { FILE_PATH_LITERAL("Unconfirmed xxx.crdownload"),
true,
true,
false,
@@ -180,7 +180,7 @@ const struct {
2, },
// Dangerous download, download finishes AFTER rename.
// Needs to be renamed only once.
- { FILE_PATH_LITERAL("unconfirmed xxx.crdownload"),
+ { FILE_PATH_LITERAL("Unconfirmed xxx.crdownload"),
true,
false,
false,