summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/safe_browsing/download_file_types.proto
blob: f9e2f3bb5618971a00fd2cc4d9f6fe3d02248baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package safe_browsing;

// See //chrome/browser/resources/safe_browsing/README.md for guidelines
// on how to set fields in this file.

// Next id: 5
message DownloadFileType {
  optional string extension = 1;  // required, except in default_file_type.
  optional int64 uma_value = 2;   // required
  optional bool is_archive = 3 [default = false];

  enum PingSetting {
    SAMPLED_PING = 0;
    NO_PING = 1;
    FULL_PING = 2;
  }
  optional PingSetting ping_setting = 4;  // required

  enum DangerLevel {
    NOT_DANGEROUS = 0;
    ALLOW_ON_USER_GESTURE = 1;
    DANGEROUS = 2;
  }

  enum AutoOpenHint {
    DISALLOW_AUTO_OPEN = 0;
    ALLOW_AUTO_OPEN = 1;
  }

  enum PlatformType {
    PLATFORM_ANY = 0;
    PLATFORM_ANDROID = 1;
    PLATFORM_CHROME_OS = 2;
    PLATFORM_LINUX = 3;
    PLATFORM_MAC = 4;
    PLATFORM_WINDOWS = 5;
  }

  // Next id: 5
  message PlatformSettings {
    optional PlatformType platform = 1 [default = PLATFORM_ANY];
    optional DangerLevel danger_level = 2;     // required
    optional AutoOpenHint auto_open_hint = 3;  // required
    optional uint64 max_file_size_to_analyze = 4
        [default = 18446744073709551615];  // (2^64)-1]
  };

  // Protos parsed by Chrome should have exactly one entry here.
  repeated PlatformSettings platform_settings = 5;

  // The type of file content inspection we should do, if any.
  enum InspectionType {
    NONE = 0;
    ZIP = 1;
    RAR = 2;
    DMG = 3;
  }
  optional InspectionType inspection_type = 6;
};

// Next id: 6
message DownloadFileTypeConfig {
  // All required
  optional uint32 version_id = 1;
  optional float sampled_ping_probability = 2;
  repeated DownloadFileType file_types = 3;
  optional DownloadFileType default_file_type = 4;

  // Limits on repeated fields in the ClientDownloadRequest (i.e. the
  // download ping). Limits are per-ping.
  optional uint64 max_archived_binaries_to_report = 5;
}