summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd3
-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
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_mac.mm2
-rw-r--r--chrome/browser/ui/gtk/download_item_gtk.cc2
6 files changed, 18 insertions, 6 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 805d06c..922013e 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -2069,6 +2069,9 @@ each locale. -->
<message name="IDS_DOWNLOAD_STATUS_CANCELED" desc="Canceled text.">
Canceled
</message>
+ <message name="IDS_DOWNLOAD_UNCONFIRMED_PREFIX" desc="The prefix used in the unconfirmed download file.">
+ Unconfirmed
+ </message>
<message name="IDS_PROMPT_DANGEROUS_DOWNLOAD"
desc="Message shown to the user to validate the download of a dangerous file.">
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,
diff --git a/chrome/browser/ui/cocoa/download/download_item_mac.mm b/chrome/browser/ui/cocoa/download/download_item_mac.mm
index f39cb96..ab756ce 100644
--- a/chrome/browser/ui/cocoa/download/download_item_mac.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_mac.mm
@@ -35,7 +35,7 @@ void DownloadItemMac::OnDownloadUpdated(DownloadItem* download) {
}
if (download->GetUserVerifiedFilePath() != lastFilePath_) {
- // Turns out the file path is "unconfirmed %d.crdownload" for dangerous
+ // Turns out the file path is "Unconfirmed %d.crdownload" for dangerous
// downloads. When the download is confirmed, the file is renamed on
// another thread, so reload the icon if the download filename changes.
LoadIcon();
diff --git a/chrome/browser/ui/gtk/download_item_gtk.cc b/chrome/browser/ui/gtk/download_item_gtk.cc
index b532d17..4e7fb71 100644
--- a/chrome/browser/ui/gtk/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download_item_gtk.cc
@@ -356,7 +356,7 @@ void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
}
if (download->GetUserVerifiedFilePath() != icon_filepath_) {
- // Turns out the file path is "unconfirmed %d.crdownload" for dangerous
+ // Turns out the file path is "Unconfirmed %d.crdownload" for dangerous
// downloads. When the download is confirmed, the file is renamed on
// another thread, so reload the icon if the download filename changes.
LoadIcon();