Index: chrome/browser/download/download_prefs.cc |
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc |
index 8673e0ac4e5a5302e569acc221a67bbfe4ad80ca..70cc61d3782eded4d484827642647f796d7fb0e7 100644 |
--- a/chrome/browser/download/download_prefs.cc |
+++ b/chrome/browser/download/download_prefs.cc |
@@ -9,6 +9,7 @@ |
#include "base/string_util.h" |
#include "base/sys_string_conversions.h" |
#include "base/utf_string_conversions.h" |
+#include "chrome/browser/download/download_extensions.h" |
#include "chrome/browser/download/download_util.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/common/pref_names.h" |
@@ -30,7 +31,7 @@ DownloadPrefs::DownloadPrefs(PrefService* prefs) : prefs_(prefs) { |
#elif defined(OS_WIN) |
FilePath path(UTF8ToWide(extensions[i])); |
#endif |
- if (!extensions[i].empty() && !download_util::IsExecutableFile(path)) |
+ if (!extensions[i].empty() && download_util::IsFileSafe(path)) |
auto_open_.insert(path.value()); |
} |
} |
@@ -87,7 +88,7 @@ bool DownloadPrefs::EnableAutoOpenBasedOnExtension(const FilePath& file_name) { |
return false; |
DCHECK(extension[0] == FilePath::kExtensionSeparator); |
extension.erase(0, 1); |
- if (download_util::IsExecutableExtension(extension)) |
+ if (!download_util::IsFileExtensionSafe(extension)) |
return false; |
auto_open_.insert(extension); |