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

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

Issue 1403001: Modifying the "dangerous download" algorithm. (Closed)
Patch Set: Moving extension methods out of download_util.h Created 10 years, 1 month 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_item.cc
diff --git a/chrome/browser/download/download_item.cc b/chrome/browser/download/download_item.cc
index 886903faedf0914af90efde6e6d8e85fd47dae63..61fc8965f8065768ad88079ec49826b2f42e6250 100644
--- a/chrome/browser/download/download_item.cc
+++ b/chrome/browser/download/download_item.cc
@@ -11,6 +11,7 @@
#include "base/utf_string_conversions.h"
#include "net/base/net_util.h"
#include "chrome/browser/browser_thread.h"
+#include "chrome/browser/download/download_extensions.h"
#include "chrome/browser/download/download_file_manager.h"
#include "chrome/browser/download/download_history.h"
#include "chrome/browser/download/download_manager.h"
@@ -164,7 +165,7 @@ void DownloadItem::NotifyObserversDownloadFileCompleted() {
bool DownloadItem::CanOpenDownload() {
return !Extension::IsExtension(target_name_) &&
- !download_util::IsExecutableFile(target_name_);
+ download_util::IsFileSafe(target_name_);
}
bool DownloadItem::ShouldOpenFileBasedOnExtension() {

Powered by Google App Engine
This is Rietveld 408576698