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

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: Rebase, work around new Mac problem. Created 7 years, 2 months 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
Index: chrome/browser/download/download_extensions.cc
diff --git a/chrome/browser/download/download_extensions.cc b/chrome/browser/download/download_extensions.cc
index 630d296e1e8db9679530f8662c77d2cb0d5ae02a..6a1d0e7de60874c80739e865856baff9183e7d34 100644
--- a/chrome/browser/download/download_extensions.cc
+++ b/chrome/browser/download/download_extensions.cc
@@ -179,9 +179,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 },
@@ -224,7 +221,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))

Powered by Google App Engine
This is Rietveld 408576698