Index: chrome/browser/download/download_prefs.h |
diff --git a/chrome/browser/download/download_prefs.h b/chrome/browser/download/download_prefs.h |
index d0c8cfaa6a0abaf5a0643b9418285b817ebb27ad..f745a3a8b8f4335125601ff85c770bcf8b9a1875 100644 |
--- a/chrome/browser/download/download_prefs.h |
+++ b/chrome/browser/download/download_prefs.h |
@@ -26,6 +26,12 @@ class PrefRegistrySyncable; |
// Stores all download-related preferences. |
class DownloadPrefs { |
public: |
+ enum DOWNLOAD_RESTRICTION { |
David Trainor- moved to gerrit
2017/06/12 19:09:05
DownloadRestriction? The all caps w/ _ feels more
MAD
2017/06/12 19:45:14
Done.
|
+ DOWNLOAD_RESTRICTION_NONE = 0, |
+ DOWNLOAD_RESTRICTION_DANGEROUS_FILES = 1, |
+ DOWNLOAD_RESTRICTION_POTENTIALLY_DANGEROUS_FILES = 2, |
+ DOWNLOAD_RESTRICTION_ALL_FILES = 3, |
+ }; |
explicit DownloadPrefs(Profile* profile); |
~DownloadPrefs(); |
@@ -49,6 +55,9 @@ class DownloadPrefs { |
base::FilePath SaveFilePath() const; |
void SetSaveFilePath(const base::FilePath& path); |
int save_file_type() const { return *save_file_type_; } |
+ DOWNLOAD_RESTRICTION download_restriction() const { |
+ return static_cast<DOWNLOAD_RESTRICTION>(*download_restriction_); |
+ } |
void SetSaveFileType(int type); |
// Returns true if the prompt_for_download preference has been set and the |
@@ -99,6 +108,7 @@ class DownloadPrefs { |
FilePathPrefMember download_path_; |
FilePathPrefMember save_file_path_; |
IntegerPrefMember save_file_type_; |
+ IntegerPrefMember download_restriction_; |
// Set of file extensions to open at download completion. |
struct AutoOpenCompareFunctor { |