| Index: chrome/browser/download/download_manager.cc
|
| diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
|
| index 9c1cb1197d6e6228a697fa19433407500d2cf3bd..a00c115b252e8845fb825acb220dd88f3b4ecf39 100644
|
| --- a/chrome/browser/download/download_manager.cc
|
| +++ b/chrome/browser/download/download_manager.cc
|
| @@ -19,6 +19,7 @@
|
| #include "chrome/browser/browser_list.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/download/download_file.h"
|
| +#include "chrome/browser/download/download_util.h"
|
| #include "chrome/browser/extensions/extension_install_ui.h"
|
| #include "chrome/browser/extensions/extensions_service.h"
|
| #include "chrome/browser/profile.h"
|
| @@ -46,11 +47,6 @@
|
| #include "base/win_util.h"
|
| #endif
|
|
|
| -#if !defined(OS_MACOSX)
|
| -// Used for initializing the list of dangerous extensions. We don't support it
|
| -// yet on mac.
|
| -#include "chrome/browser/download/download_util.h"
|
| -#endif
|
|
|
| #if defined(OS_LINUX)
|
| #include <gtk/gtk.h>
|
| @@ -528,10 +524,8 @@ bool DownloadManager::Init(Profile* profile) {
|
| file_loop_->PostTask(FROM_HERE, NewRunnableFunction(
|
| CreateDirectoryPtr, download_path()));
|
|
|
| -#if defined(OS_WIN) || defined(OS_LINUX)
|
| // We use this to determine possibly dangerous downloads.
|
| download_util::InitializeExeTypes(&exe_types_);
|
| -#endif
|
|
|
| // We store any file extension that should be opened automatically at
|
| // download completion in this pref.
|
| @@ -1335,21 +1329,16 @@ bool DownloadManager::IsExecutableMimeType(const std::string& mime_type) {
|
| }
|
|
|
| bool DownloadManager::IsExecutable(const FilePath::StringType& extension) {
|
| -#if defined(OS_MACOSX)
|
| - // We don't have dangerous download support on mac yet.
|
| - return false;
|
| -#else
|
| if (!IsStringASCII(extension))
|
| return false;
|
| #if defined(OS_WIN)
|
| std::string ascii_extension = WideToASCII(extension);
|
| -#elif defined(OS_LINUX)
|
| +#elif defined(OS_POSIX)
|
| std::string ascii_extension = extension;
|
| #endif
|
| StringToLowerASCII(&ascii_extension);
|
|
|
| return exe_types_.find(ascii_extension) != exe_types_.end();
|
| -#endif // !defined(OS_MACOSX)
|
| }
|
|
|
| void DownloadManager::ResetAutoOpenFiles() {
|
|
|