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

Unified Diff: chrome/browser/download/download_manager.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_manager.cc
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index a451d4138588e7be036dd0bf3a7abf877bffcf09..031465458ee08ee4cf157d9bec7cd4fceb18ca5d 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.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_item.h"
@@ -803,7 +804,7 @@ bool DownloadManager::ShouldOpenFileBasedOnExtension(
FilePath::StringType extension = path.Extension();
if (extension.empty())
return false;
- if (download_util::IsExecutableExtension(extension))
+ if (!download_util::IsFileExtensionSafe(extension))
return false;
if (Extension::IsExtension(path))
return false;

Powered by Google App Engine
This is Rietveld 408576698