summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 17:34:16 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 17:34:16 +0000
commit7a256ea78369c42083645a443dee4060a2f980cf (patch)
tree30b4d8ae86488c92e9a7b3136a5b077d77f1cd4c /chrome/browser/views
parent9ae1f71009b7157673e0f34432304cdcddcccbf9 (diff)
downloadchromium_src-7a256ea78369c42083645a443dee4060a2f980cf.zip
chromium_src-7a256ea78369c42083645a443dee4060a2f980cf.tar.gz
chromium_src-7a256ea78369c42083645a443dee4060a2f980cf.tar.bz2
Fix bug 3470, where the download tab would show the temporary name for dangerous downloads (see download_tab_view.cc).
Also fixes bug 3471, where if the same file is downloaded again while the first one is not finished, they would get the same name. For dangerous downloads, we now uniquify the path on download start (so the UI shows a file name most likely to be the final name), and on download complete (so if there 2 simultaneous downloads of the same file the last one does not overwrite the first). BUG=3470, 3471 TEST=see bugs Review URL: http://codereview.chromium.org/7395 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/download_tab_view.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/views/download_tab_view.cc b/chrome/browser/views/download_tab_view.cc
index fe3d692..15b43b6 100644
--- a/chrome/browser/views/download_tab_view.cc
+++ b/chrome/browser/views/download_tab_view.cc
@@ -280,7 +280,7 @@ void DownloadItemTabView::LayoutComplete() {
download_util::kBigProgressIconSize + kInfoPadding;
// File name and URL
- file_name_->SetText(model_->file_name());
+ file_name_->SetText(model_->GetFileName());
gfx::Size file_name_size = file_name_->GetPreferredSize();
file_name_->SetBounds(dx, download_util::kBigProgressIconOffset,
std::min(kFilenameSize,
@@ -330,7 +330,7 @@ void DownloadItemTabView::LayoutCancelled() {
download_util::kBigProgressIconSize + kInfoPadding;
// File name and URL, truncated to show cancelled status
- file_name_->SetText(model_->file_name());
+ file_name_->SetText(model_->GetFileName());
gfx::Size file_name_size = file_name_->GetPreferredSize();
file_name_->SetBounds(dx, download_util::kBigProgressIconOffset,
kFilenameSize - kProgressSize - kSpacer,