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

Unified Diff: chrome/browser/download/download_extensions.h

Issue 1165893004: [Downloads] Prevent dangerous files from being opened automatically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a blacklist instead of including all dangerous file types. Created 5 years, 6 months 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_extensions.h
diff --git a/chrome/browser/download/download_extensions.h b/chrome/browser/download/download_extensions.h
index 67980caa662baa02bd5ad6c19fe121386a15eda4..93fcb78d09f39773731f5b582a169fb7650726a9 100644
--- a/chrome/browser/download/download_extensions.h
+++ b/chrome/browser/download/download_extensions.h
@@ -20,6 +20,11 @@ enum DownloadDangerLevel {
// Determine the download danger level of a file.
DownloadDangerLevel GetFileDangerLevel(const base::FilePath& path);
+// Returns true if the file specified by |path| is allowed to open
+// automatically. Most file types can be set to open automatically, but some
+// executable file types may not.
+bool IsAllowedToOpenAutomatically(const base::FilePath& path);
+
// Tests if we think the server means for this mime_type to be executable.
bool IsExecutableMimeType(const std::string& mime_type);

Powered by Google App Engine
This is Rietveld 408576698