summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
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/history
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/history')
-rw-r--r--chrome/browser/history/download_types.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/history/download_types.h b/chrome/browser/history/download_types.h
index 323a868..536ca30 100644
--- a/chrome/browser/history/download_types.h
+++ b/chrome/browser/history/download_types.h
@@ -39,7 +39,8 @@ struct DownloadCreateInfo {
request_id(-1),
db_handle(0),
save_as(false),
- is_dangerous(false) {
+ is_dangerous(false),
+ is_extension_install(false) {
}
DownloadCreateInfo()
@@ -53,7 +54,8 @@ struct DownloadCreateInfo {
request_id(-1),
db_handle(0),
save_as(false),
- is_dangerous(false) {
+ is_dangerous(false),
+ is_extension_install(false) {
}
// DownloadItem fields
@@ -80,6 +82,8 @@ struct DownloadCreateInfo {
bool is_dangerous;
// The original name for a dangerous download.
FilePath original_name;
+ // Whether this download is for extension install or not.
+ bool is_extension_install;
// The charset of the referring page where the download request comes from.
// It's used to construct a suggested filename.
std::string referrer_charset;