summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/download_item_view.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 21:27:17 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 21:27:17 +0000
commitf81f88b0106228cd408fd632235da64a0c64c4ce (patch)
treeb8336db32acae1cfefffb72fbf48208688fc5ca9 /chrome/browser/views/download_item_view.cc
parentfcdb746405a7289ecc02ff32d91197599ce1a45c (diff)
downloadchromium_src-f81f88b0106228cd408fd632235da64a0c64c4ce.zip
chromium_src-f81f88b0106228cd408fd632235da64a0c64c4ce.tar.gz
chromium_src-f81f88b0106228cd408fd632235da64a0c64c4ce.tar.bz2
Messaging of the download item for extension is now:
Extensions can harm your computer. Are you sure you want to continue? [Continue] [Discard] This involved taking out the GTMUILocalizerAndLayoutTweaker from the xib and placing it within the controller itself, since the content of the UI is determined at runtime and cannot rely simply on the xib contents. For Win and Linux, only the confirm button needed to change. Patch by Andy Bonventre <andybons@gmail.com> BUG=23105,25257 TEST=When clicking on a link to an extension, the messaging should be specific to extensions and the button to confirm the installation should be 'Continue' instead of 'Save'. Review URL: http://codereview.chromium.org/293014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/download_item_view.cc')
-rw-r--r--chrome/browser/views/download_item_view.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 5869b15..904a954 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -286,8 +286,9 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
drop_down_state_ = DANGEROUS;
warning_icon_ = rb.GetBitmapNamed(IDR_WARNING);
- save_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_SAVE_DOWNLOAD));
+ save_button_ = new views::NativeButton(this, l10n_util::GetString(
+ DownloadManager::IsExtensionInstall(download) ?
+ IDS_CONTINUE_EXTENSION_DOWNLOAD : IDS_SAVE_DOWNLOAD));
save_button_->set_ignore_minimum_size(true);
discard_button_ = new views::NativeButton(
this, l10n_util::GetString(IDS_DISCARD_DOWNLOAD));
@@ -320,16 +321,15 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
if (extension.length() > kFileNameMaxLength / 2)
ElideString(extension, kFileNameMaxLength / 2, &extension);
- ElideString(rootname, kFileNameMaxLength - extension.length(), &rootname);
- std::wstring filename = rootname + L"." + extension;
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
- l10n_util::WrapStringWithLTRFormatting(&filename);
-
// The dangerous download label text is different for an extension file.
if (DownloadManager::IsExtensionInstall(download)) {
dangerous_download_label_ = new views::Label(
l10n_util::GetString(IDS_PROMPT_DANGEROUS_DOWNLOAD_EXTENSION));
} else {
+ ElideString(rootname, kFileNameMaxLength - extension.length(), &rootname);
+ std::wstring filename = rootname + L"." + extension;
+ if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ l10n_util::WrapStringWithLTRFormatting(&filename);
dangerous_download_label_ = new views::Label(
l10n_util::GetStringF(IDS_PROMPT_DANGEROUS_DOWNLOAD, filename));
}