summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_controller.mm
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-25 06:50:57 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-25 06:50:57 +0000
commita60c8aece36a887feb6508cd2fb2bc57a6d9dc88 (patch)
tree088bed2c3f41c4b65eacc2150807671875e8f99d /chrome/browser/cocoa/download_item_controller.mm
parenta2d86f08b8d8dda7627c078417dd20573619142b (diff)
downloadchromium_src-a60c8aece36a887feb6508cd2fb2bc57a6d9dc88.zip
chromium_src-a60c8aece36a887feb6508cd2fb2bc57a6d9dc88.tar.gz
chromium_src-a60c8aece36a887feb6508cd2fb2bc57a6d9dc88.tar.bz2
Handle extensions correctly when the default download location is not writable
BUG=28668 TEST=Set the Download location a NON-writable location (such as '/Application' on Mac) in 'Under the Hood' preferences. Make sure 'Ask where to save...' is kept unchecked. Go to 'https://tools.google.com/chrome/intl/en/themes/index.html' and click 'apply theme'. Make sure 'Save as...' dialog opens to ask users for an alternative download location. Save the file in a writable directory. Make sure the theme applies (or an extension installation dialog opens for extensions). Make sure the download does NOT appear in Downloads history. Make sure it also works for chrome extensions. TEST=(regression) Make sure theme/extension installation works as expected in normal cases (when the default download location is pointing to a writable location and 'Ask where to save...' is unchecked in 'Under the Hood' preferences.) Make sure the download does NOT appear in Downloads history. Make sure the same thing happens for chrome extensions. TEST=(regression) Make sure right-clicking on theme/extension files and selecting 'Save link as...' works as a normal download. Make sure the file is downloaded and saved with the given name. Make sure the theme does NOT apply and an extension installation dialog does NOT open. Make sure the download appears in Downloads history. Review URL: http://codereview.chromium.org/486009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r--chrome/browser/cocoa/download_item_controller.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index 90cd7e7..35c3bea 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -140,7 +140,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
NSString* confirmButtonTitle;
// The dangerous download label and button text are different for an
// extension file.
- if (DownloadManager::IsExtensionInstall(downloadModel->download())) {
+ if (downloadModel->download()->is_extension_install()) {
dangerousWarning = l10n_util::GetNSStringWithFixup(
IDS_PROMPT_DANGEROUS_DOWNLOAD_EXTENSION);
confirmButtonTitle = l10n_util::GetNSStringWithFixup(