File: extension_install.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (232 lines) | stat: -rw-r--r-- 10,343 bytes parent folder | download | duplicates (6)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
// Copyright 2017 The Chromium Authors
// 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;
option java_package = "org.chromium.components.metrics";

option java_outer_classname = "ExtensionInstallProtos";

package metrics;

// Stores information about an extension installed on a fully-initialized
// profile. If a single extension is installed in multiple profiles, it will be
// recorded multiple times. Next tag: 18.
message ExtensionInstallProto {
  // The type of extension item this is.
  enum Type {
    UNKNOWN_TYPE = 0;            // Unknown (hopefully never used)
    EXTENSION = 1;               // A browser extension
    THEME = 2;                   // A browser theme
    USER_SCRIPT = 3;             // An extension converted from a user script
    HOSTED_APP = 4;              // A hosted app
    LEGACY_PACKAGED_APP = 5;     // A (deprecated) v1 packaged app
    PLATFORM_APP = 6;            // A platform app
    SHARED_MODULE = 7;           // A shared module
    LOGIN_SCREEN_EXTENSION = 8;  // An extension running on the login screen
  }

  optional Type type = 1;

  // The source of the extension.
  enum InstallLocation {
    UNKNOWN_LOCATION = 0;  // Unknown (hopefully never used)
    INTERNAL = 1;  // A crx file from the internal Extensions directory; most
                   // webstore-installed extensions fall into this category.
    EXTERNAL_PREF = 2;  // A crx file from an external directory (via prefs).
    EXTERNAL_REGISTRY = 3;  // A crx file from an external directory (via the
                            // Windows registry)
    UNPACKED = 4;   // An unpacked extension loaded from chrome://extensions.
    COMPONENT = 5;  // An internal component extension.
    EXTERNAL_PREF_DOWNLOAD = 6;    // A crx file from an external directory (via
                                   // prefs), downloaded from an update URL.
    EXTERNAL_POLICY_DOWNLOAD = 7;  // A crx file from an external directory (via
                                   // admin policies), downloaded from an update
                                   // URL.
    COMMAND_LINE = 8;  // Loaded from the commandline (e.g. --load-extension).
    EXTERNAL_POLICY = 9;  // A crx file from an external directory (via admin
                          // policies), cached locally and installed from the
                          // cache.
    EXTERNAL_COMPONENT = 10;  // A component extension that was downloaded
                              // externally via an update url.
  }

  optional InstallLocation install_location = 2;

  // The manifest version in the extension. Note: this refers to the
  // Chrome-required versioning of the manifest, not the extension version.
  // Currently, it is always 1 or 2.
  optional int32 manifest_version = 3;

  // The associated UI action in the extension. Each extension can have at most
  // one type of action.
  enum ActionType {
    NO_ACTION = 0;

    BROWSER_ACTION = 1;

    PAGE_ACTION = 2;

    // Deprecated, this API was removed in M134.
    SYSTEM_INDICATOR = 3 [deprecated = true];

    // In manifest version 3, PAGE_ACTION and BROWSER_ACTION are replaced with a
    // single ACTION type.
    ACTION = 4;
  }

  optional ActionType action_type = 4;

  // If the extension has been granted file access.
  optional bool has_file_access = 5;

  // If the extension has been granted permission to run in incognito contexts.
  optional bool has_incognito_access = 6;

  // If the extension originated from the Chrome Web Store according to the
  // prefs.
  // This differs from install_location, which specifies from where the location
  // on the user’s machine from where the install originated, but not whether
  // the extension is hosted in the store. For instance, sideloaded extensions
  // that are specified via ID in the registry are downloaded from the store.
  optional bool is_from_store = 7;

  // If the extension automatically updates from the Chrome Web Store.
  optional bool updates_from_store = 8;

  // If the extension is a bookmark app that was generated from a web page. This
  // is distinct from install_location above, which specifies from where on the
  // user’s machine the install originated.
  // Deprecated: This field is no longer populated as bookmark apps are no
  // longer supported.
  optional bool is_from_bookmark = 9;

  // If the extension was created from a user script. This is distinct from
  // install_location above, which specifies from where on the user’s machine
  // the install originated.
  optional bool is_converted_from_user_script = 10;

  // If the extension was installed by default when the profile was created.
  // These extensions are specified by Chrome.
  optional bool is_default_installed = 11;

  // If the extension was installed by an OEM. This differs from
  // "is_default_installed", since these extensions are specified by the OEM
  // rather than by Chrome. These are specified in a file that is created as
  // part of the creation of the Chrome image, and can be specific to different
  // OEMs.
  optional bool is_oem_installed = 12;

  // The type of background page this extension has. Each extension can have at
  // most one type of background presence.
  enum BackgroundScriptType {
    NO_BACKGROUND_SCRIPT = 0;        // The extension has no background page.
    PERSISTENT_BACKGROUND_PAGE = 1;  // The extension has a persistent
                                     // background page.
    EVENT_PAGE = 2;                  // The extension has a (lazy) event page.
    SERVICE_WORKER = 3;              // The extension has a service worker based
                                     // background context.
  }

  optional BackgroundScriptType background_script_type = 13;

  // The reasons an extension may be disabled.
  enum DisableReason {
    USER_ACTION = 0;              // The user disabled the extension.
    PERMISSIONS_INCREASE = 1;     // The extension increased permissions.
    RELOAD = 2;                   // The extension is reloading.
    UNSUPPORTED_REQUIREMENT = 3;  // The extension has requirements that weren't
                                  // met (e.g. graphics capabilities).
    SIDELOAD_WIPEOUT = 4;         // The extension was disabled in the sideload
                                  // wipeout.
    UNKNOWN_FROM_SYNC = 5;        // The extension was disabled by sync.
    NOT_VERIFIED = 6;             // The extension couldn't be verified.
    GREYLIST = 7;                 // The extension was found on the greylist.
    CORRUPTED = 8;  // The extension install was corrupted according to content
                    // verification.
    REMOTE_INSTALL = 9;  // The extension was installed remotely and hasn't been
                         // enabled.
    EXTERNAL_EXTENSION = 10;  // The extension was sideloaded and hasn't been
                              // enabled.
    UPDATE_REQUIRED_BY_POLICY = 11;    // Policy requires an unmet minimum
                                       // version.
    CUSTODIAN_APPROVAL_REQUIRED = 12;  // The extension is pending custodian
                                       // approval for a supervised user.
    BLOCKED_BY_POLICY = 13;  // The extension is disabled because it's blocked
                             // by enterprise policy.

    // The extension is being reinstalled.
    REINSTALL = 16;

    // The extension has been disabled because it's not allowlisted and the Safe
    // Browsing allowlist is enforced in the user profile.
    NOT_ALLOWLISTED = 17;

    // The extension is disabled because it is not in 1st party ash keep list
    // and the 1st party ash extension keep list is enforced in ash.
    NOT_ASH_KEEPLISTED = 18;

    // Policy requires the extension to be published and available for download
    // from the web store.
    PUBLISHED_IN_STORE_REQUIRED_BY_POLICY = 19;

    // The extension is using an unsupported manifest version.
    UNSUPPORTED_MANIFEST_VERSION = 20;

    // The extension is disabled because it is a "developer extension" (for
    // example, an unpacked extension) while the developer mode in
    // chrome://extensions is OFF.
    UNSUPPORTED_DEVELOPER_EXTENSION = 21;

    // Disabled because of an unknown reason. This can happen when newer
    // versions of the browser sync reasons which are not known to the current
    // version. We never actually write this to prefs. This is used to indicate
    // (at runtime) that unknown reasons are present in the prefs.
    UNKNOWN = 22;
  }

  // Any DisableReasons in effect for the extension. An empty list means the
  // extension is not disabled. Note that an extension that is not disabled may
  // nonetheless not be running, e.g., terminated because the extension process
  // was killed.
  repeated DisableReason disable_reasons = 14;

  // The state of the extension in the safe browsing blacklist.
  // The numeric values here match the values of the respective enum in
  // ClientCRXListInfoResponse proto.
  enum BlacklistState {
    // The extension is not in the blacklist.
    NOT_BLACKLISTED = 0;

    // The extension is malware.
    BLACKLISTED_MALWARE = 1;

    // The extension has a serious security vulnerability.
    BLACKLISTED_SECURITY_VULNERABILITY = 2;

    // The extension violated CWS policy.
    BLACKLISTED_CWS_POLICY_VIOLATION = 3;

    // The extension is considered potentially unwanted.
    BLACKLISTED_POTENTIALLY_UNWANTED = 4;

    // Used when we couldn't connect to server, e.g. when offline.
    BLACKLISTED_UNKNOWN = 5;
  }

  optional BlacklistState blacklist_state = 15;

  // Whether the extension was installed in the current sampling period. This
  // is useful if trying to use extension installation in conjunction with other
  // metrics (e.g. page load). Since some of the metrics from this period will
  // have the extension installed and others won't, these records can be
  // discarded for that analysis.
  optional bool installed_in_this_sample_period = 16;

  // Whether the profile this extension is installed on has developer mode in
  // chrome://extensions toggled ON. Note: this refers to the current developer
  // mode status of the profile, not when the extension was installed.
  optional bool in_extensions_developer_mode = 17;
}