Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3735)

Unified Diff: chrome/browser/download/download_extensions.cc

Issue 4883003: Add FilePath::FinalExtension() to avoid double extensions (.tar.gz) for file selector (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment (also a rebase) Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/files/file_path_unittest.cc ('k') | chrome/browser/download/download_file_picker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_extensions.cc
diff --git a/chrome/browser/download/download_extensions.cc b/chrome/browser/download/download_extensions.cc
index 6e72474e4ef05c5085c62419ebf600bd0b56732d..baa1358af00f528855c08ce18e0e4ab1d259065a 100644
--- a/chrome/browser/download/download_extensions.cc
+++ b/chrome/browser/download/download_extensions.cc
@@ -166,9 +166,6 @@ static const struct Executables {
{ "shs", ALLOW_ON_USER_GESTURE },
{ "sys", DANGEROUS },
{ "url", ALLOW_ON_USER_GESTURE },
- // TODO(davidben): Remove this when double-extensions are no longer
- // a nuisance.
- { "user.js", ALLOW_ON_USER_GESTURE },
{ "vb", ALLOW_ON_USER_GESTURE },
{ "vbe", ALLOW_ON_USER_GESTURE },
{ "vbs", ALLOW_ON_USER_GESTURE },
@@ -211,7 +208,7 @@ static const struct Executables {
};
DownloadDangerLevel GetFileDangerLevel(const base::FilePath& path) {
- base::FilePath::StringType extension(path.Extension());
+ base::FilePath::StringType extension(path.FinalExtension());
if (extension.empty())
return NOT_DANGEROUS;
if (!IsStringASCII(extension))
« no previous file with comments | « base/files/file_path_unittest.cc ('k') | chrome/browser/download/download_file_picker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698