Index: chrome/browser/download/download_util.h |
diff --git a/chrome/browser/download/download_util.h b/chrome/browser/download/download_util.h |
index 0224a26df98ac5f1b2b668383448f16c7468a7bb..81f3b2a89d6e1ce0fb6ccc5e66586a3ae3df4491 100644 |
--- a/chrome/browser/download/download_util.h |
+++ b/chrome/browser/download/download_util.h |
@@ -152,11 +152,24 @@ void DragDownload(const DownloadItem* download, |
// Executable file support ----------------------------------------------------- |
-// Tests if a file is considered executable, based on its type. |
-bool IsExecutableFile(const FilePath& path); |
+enum DownloadDangerLevel { |
+ NotDangerous, |
+ AllowOnUserGesture, |
+ Dangerous |
+}; |
+ |
+// Determine the download danger level of a file. |
+DownloadDangerLevel GetFileDangerLevel(const FilePath& path); |
+ |
+// Determine the download danger level using a file extension. |
+DownloadDangerLevel GetFileExtensionDangerLevel( |
+ const FilePath::StringType& extension); |
+ |
+// True if the download danger level of the file is NotDangerous. |
+bool IsFileSafe(const FilePath& path); |
-// Determine if the specified extension is an executable extension. |
-bool IsExecutableExtension(const FilePath::StringType& extension); |
+// True if the download danger level of the extension is NotDangerous. |
+bool IsFileExtensionSafe(const FilePath::StringType& extension); |
// Tests if we think the server means for this mime_type to be executable. |
bool IsExecutableMimeType(const std::string& mime_type); |