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

Unified Diff: chrome/common/safe_browsing/file_type_policies.h

Issue 1982723002: Use FileTypePolicies for download danger classifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_policies
Patch Set: Fix bad rebase Created 4 years, 7 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/chrome_browser.gypi ('k') | chrome/common/safe_browsing/file_type_policies.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/safe_browsing/file_type_policies.h
diff --git a/chrome/common/safe_browsing/file_type_policies.h b/chrome/common/safe_browsing/file_type_policies.h
index 8deeca67ebba50a1428e64c7fb1a831bfadcea8c..2d377252815b1bbfe462b4c5a0d023f19630ec5a 100644
--- a/chrome/common/safe_browsing/file_type_policies.h
+++ b/chrome/common/safe_browsing/file_type_policies.h
@@ -48,9 +48,6 @@ class FileTypePolicies {
//
// Accessors
//
- DownloadFileType PolicyForFile(const base::FilePath& file) const;
- DownloadFileType::PlatformSettings SettingsForFile(
- const base::FilePath& file) const;
bool IsArchiveFile(const base::FilePath& file) const;
// SBClientDownloadExtensions UMA histogram bucket for this file's type.
@@ -60,8 +57,19 @@ class FileTypePolicies {
// this type of file.
bool IsCheckedBinaryFile(const base::FilePath& file) const;
+ // True if the user can select this file type to be opened automatically.
+ bool IsAllowedToOpenAutomatically(const base::FilePath& file) const;
+
+ // Return the danger level of this file type.
+ DownloadFileType::DangerLevel GetFileDangerLevel(
+ const base::FilePath& file) const;
+
float SampledPingProbability() const;
+ DownloadFileType PolicyForFile(const base::FilePath& file) const;
+ DownloadFileType::PlatformSettings SettingsForFile(
+ const base::FilePath& file) const;
+
protected:
// Creator must call one of Populate* before calling other methods.
FileTypePolicies();
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/safe_browsing/file_type_policies.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698