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

Unified Diff: chrome/common/safe_browsing/download_file_types.proto

Issue 1929693003: Populate download_file_types proto and filter it for each platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@file_type_polices2
Patch Set: reorder ascipb per asanka's comments 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_resources.gyp ('k') | chrome/common/safe_browsing/download_protection_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/safe_browsing/download_file_types.proto
diff --git a/chrome/common/safe_browsing/download_file_types.proto b/chrome/common/safe_browsing/download_file_types.proto
index 8efe589a32138d3eec0159b50fad1e51a3da1f5f..8572c83cca979ab9b1c07c222682d40adc73ee2a 100644
--- a/chrome/common/safe_browsing/download_file_types.proto
+++ b/chrome/common/safe_browsing/download_file_types.proto
@@ -13,9 +13,19 @@ package safe_browsing;
// Next id: 5
message DownloadFileType {
- optional string extension = 1; // required
+ optional string extension = 1; // required, except in default_file_type.
optional int64 uma_value = 2; // required
- optional bool is_archive = 3;
+ optional bool is_archive = 3 [default = false];
+
+ // TODO(nparker): Add a field describing what Chrome-internal unpacker
+ // should be used to scan this file type (DMG or zip are currently supported)
+
+ enum PingSetting {
+ SAMPLED_PING = 0;
+ NO_PING = 1;
+ FULL_PING = 2;
+ }
+ optional PingSetting ping_setting = 4; // required
enum DangerLevel {
NOT_DANGEROUS = 0;
@@ -24,11 +34,12 @@ message DownloadFileType {
}
enum AutoOpenHint {
+ DISALLOW_AUTO_OPEN = 0;
ALLOW_AUTO_OPEN = 1;
- DISALLOW_AUTO_OPEN = 2;
}
enum PlatformType {
+ PLATFORM_ANY = 0;
PLATFORM_ANDROID = 1;
PLATFORM_CHROME_OS = 2;
PLATFORM_LINUX = 3;
@@ -36,28 +47,20 @@ message DownloadFileType {
PLATFORM_WINDOWS = 5;
}
- enum PingSetting {
- SAMPLED_PING = 0;
- NO_PING = 1;
- FULL_PING = 2;
- }
-
- // TODO(nparker): Add a field describing what Chrome-internal unpacker
- // should be used to scan this file type (DMG or zip are currently supported)
-
- // Next id: 5
+ // Next id: 4
message PlatformSettings {
- optional PlatformType platform = 1;
+ optional PlatformType platform = 1 [default = PLATFORM_ANY];
optional DangerLevel danger_level = 2; // required
optional AutoOpenHint auto_open_hint = 3; // required
- optional PingSetting ping_setting = 4; // required
};
- repeated PlatformSettings platform_settings = 4; // required >= 1
+ // Protos parsed by Chrome should have exactly one entry here.
+ repeated PlatformSettings platform_settings = 5;
};
// Next id: 5
message DownloadFileTypeConfig {
+ // All required
optional uint32 version_id = 1;
optional float sampled_ping_probability = 2;
repeated DownloadFileType file_types = 3;
« no previous file with comments | « chrome/chrome_resources.gyp ('k') | chrome/common/safe_browsing/download_protection_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698