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

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

Issue 1165893004: [Downloads] Prevent dangerous files from being opened automatically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/download/download_extensions.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_prefs.h
diff --git a/chrome/browser/download/download_prefs.h b/chrome/browser/download/download_prefs.h
index e4d82594aa3b474cd1c8bfd2c5a6b5756221b7be..b3e70467877d60f88f4907e4f46b378d63ce713e 100644
--- a/chrome/browser/download/download_prefs.h
+++ b/chrome/browser/download/download_prefs.h
@@ -66,8 +66,12 @@ class DownloadPrefs {
// |path.Extension()|.
bool IsAutoOpenEnabledBasedOnExtension(const base::FilePath& path) const;
- // Enables auto-open based on file extension. Returns true on success.
- // TODO(phajdan.jr): Add WARN_UNUSED_RESULT here.
+ // Enables automatically opening all downloads with the same file type as
+ // |file_name|. Returns true on success. The call may fail if |file_name|
+ // either doesn't have an extension (hence the file type cannot be
+ // determined), or if the file type is one that is disallowed from being
+ // opened automatically. See IsAllowedToOpenAutomatically() for details on the
+ // latter.
bool EnableAutoOpenBasedOnExtension(const base::FilePath& file_name);
// Disables auto-open based on file extension.
« no previous file with comments | « chrome/browser/download/download_extensions.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698