OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 syntax = "proto2"; | |
Patrick Monette
2017/07/06 20:05:53
Nit: Space between syntax and option, from what I
| |
6 option optimize_for = LITE_RUNTIME; | |
7 | |
8 package conflicts; | |
9 | |
10 // Describes a version tuple. Versions are matched exactly, so missing fields | |
11 // will not match zero value fields. For example, "4" will not match "4.0" or | |
12 // "4.0.0.0". | |
13 message ModuleVersion { | |
14 required uint32 major = 1; | |
15 optional uint32 minor = 2; | |
16 // Can only be specified if |minor| is specified. | |
17 optional uint32 patch = 3; | |
18 // Can only be specified if |patch| is specified. | |
19 optional uint32 revision = 4; | |
20 } | |
21 | |
22 // Describes a module. A module is valid only if at least one of |basename| or | |
23 // |code_id| is specified, although both may be specified. A module must exactly | |
24 // match all specified fields in order to be considered a match. | |
25 message Module { | |
26 // The basename of the module. This is case insensitive. If this is not | |
27 // specified then |code_id| must be specified. | |
28 optional string basename = 1; | |
29 | |
30 // Code ID. This is equivalent to the string generated by formatting | |
31 // the FileHeader.TimeDateStamp and OptionalHeader.SizeOfImage with the | |
32 // formatting string %08X%x. Comparison is case insensitive. If this is not | |
33 // specified then |basename| must be specified. | |
34 optional string code_id = 2; | |
35 | |
36 // Version matching. Specifying both a minimum and a maximum provides an | |
37 // exact matching mechanism. Both versions are inclusive. | |
38 optional ModuleVersion version_min = 3; | |
39 optional ModuleVersion version_max = 4; | |
40 } | |
41 | |
42 // A module group is a collection of one or more modules with shared publisher | |
43 // and/or installation directory information. | |
44 message ModuleGroup { | |
45 // Publisher information. If specified then the modules in this group will | |
46 // only match if they are signed by the specified publisher. This corresponds | |
47 // to the OU specified in the signature. | |
Patrick Monette
2017/07/06 20:05:53
What's OU?
| |
48 optional string publisher = 1; | |
49 | |
50 // The directory in which the modules are found. This may use environment | |
51 // variables such as %LOCALAPPDATA%, %SYSTEMROOT%, etc. This is case | |
52 // insensitive. If not specified then any path will be accepted. | |
53 optional string directory = 2; | |
54 | |
55 // A list of modules. | |
56 repeated Module modules = 3; | |
57 } | |
58 | |
59 // Describes a whitelist of modules that will always be allowed to load, and for | |
60 // which there is no associated user messaging. | |
61 message ModuleWhitelist { | |
62 // A collection of modules, grouped by publisher/installation path | |
63 // information. | |
64 repeated ModuleGroup module_groups = 1; | |
65 } | |
66 | |
67 // The user message to display when a blacklisted module is matched at runtime. | |
68 enum BlacklistMessageType { | |
69 // The user will be presented with a message to uninstall the software. This | |
70 // message will only be displayed if a mathing software entry with | |
Patrick Monette
2017/07/06 20:05:54
s/mathing/matching
| |
71 // uninstallation registry entries can be found. This is the default action | |
72 // that is applied to all modules that are not specifically whitelisted. | |
73 // It's presence in this list allows a module to remain blacklisted, but be | |
74 // allowed to load. If this is specified then |message_url| should be empty | |
75 // and is otherwise ignored. | |
76 UNINSTALL = 0; | |
77 // The user will be presented with a message about the incompatibility of | |
78 // the related software, and provided with a link to follow for further | |
79 // information. The URL is specified via |message_url| in an associated | |
80 // BlacklistAction. | |
81 FURTHER_INFORMATION = 1; | |
82 // The user will be presented with a message about the incompatiblity of | |
83 // the related software, and provided with a link to follow in order to | |
84 // upgrade the software to a compatible version. The URL is specified via | |
85 // |message_url| in an associated BlacklistAction. | |
86 SUGGEST_UPGRADE = 2; | |
87 }; | |
88 | |
89 // The actions to take when a blacklisted module is encountered. | |
90 message BlacklistAction { | |
91 // Indicates whether or not this module should be allowed to load. This can be | |
92 // used to explicitly allow modules to load that when blocked cause problems, | |
93 // but otherwise to allow messaging to encourage users to remove them. | |
94 required bool allow_load = 1; | |
95 | |
96 // The URL associated with the user message. See BlacklistMessageType for full | |
97 // details. | |
98 required BlacklistMessageType message_type = 2; | |
99 optional string message_url = 3; | |
100 } | |
101 | |
102 // Describes a group in the module blacklist. Modules not whitelisted are | |
103 // blacklisted by default, but fine-grained control over the user messaging is | |
104 // possible using an explicit blacklist entry. | |
105 message BlacklistModuleGroup { | |
106 // The action to take when modules in this group are encountered. | |
107 required BlacklistAction action = 1; | |
108 | |
109 // The group of modules itself. | |
110 required ModuleGroup modules; | |
111 } | |
112 | |
113 // Describes a blacklist of modules that are to be handled specially when | |
114 // encountered. | |
115 message ModuleBlacklist { | |
116 repeated BlacklistModuleGroup modules_groups = 1; | |
117 } | |
118 | |
119 // The entire module list itself consists of a whitelist and a blacklist. | |
120 message ModuleList { | |
121 // The whitelisted modules. | |
122 required ModuleWhitelist whitelist; | |
123 | |
124 // The blacklisted modules, and the associated actions to take upon | |
125 // encountering them. | |
126 required ModuleBlacklist blacklist; | |
127 } | |
OLD | NEW |