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

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

Issue 5603008: Modify the "dangerous download" algorithm as follows. Original patch by Pier... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_prefs.cc
===================================================================
--- chrome/browser/download/download_prefs.cc (revision 68377)
+++ chrome/browser/download/download_prefs.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_thread.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"
@@ -31,7 +32,7 @@
#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());
}
}
@@ -88,7 +89,7 @@
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);
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698