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

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

Issue 2674973003: Adding a DownloadRestrictions group policy. (Closed)
Patch Set: Updated policy description wording. Created 3 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_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 {

Powered by Google App Engine
This is Rietveld 408576698