xref: /aosp_15_r20/external/cronet/third_party/metrics_proto/system_profile.proto (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1// Copyright 2014 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto2";
6
7option optimize_for = LITE_RUNTIME;
8option java_package = "org.chromium.components.metrics";
9
10option java_outer_classname = "SystemProfileProtos";
11
12package metrics;
13
14import "extension_install.proto";
15
16// Stores information about the user's brower and system configuration.
17// Almost all the fields should be populated on every upload. (The only
18// exception is some fields in the stability section that are only uploaded
19// once per browsing session, usually shortly after startup.)
20// Next tag: 47
21message SystemProfileProto {
22  // The time when the client was compiled/linked, in seconds since the epoch.
23  optional int64 build_timestamp = 1;
24
25  // A version number string for the application.
26  // Most commonly this is the browser version number found in a user agent
27  // string, and is typically a 4-tuple of numbers separated by periods.  In
28  // cases where the user agent version might be ambiguous (example: Linux 64-
29  // bit build, rather than 32-bit build, or a Windows version used in some
30  // special context, such as ChromeFrame running in IE), then this may include
31  // some additional postfix to provide clarification not available in the UA
32  // string.
33  //
34  // An example of a browser version 4-tuple is "5.0.322.0".  Currently used
35  // postfixes are:
36  //
37  //   "-64": a 64-bit build
38  //   "-F": Chrome is running under control of ChromeFrame
39  //   "-devel": this is not an official build of Chrome
40  //
41  // A full version number string could look similar to:
42  // "5.0.322.0-F-devel".
43  //
44  // This value, when available, is more trustworthy than the UA string
45  // associated with the request; and including the postfix, may be more
46  // specific.
47  optional string app_version = 2;
48
49  // The application can create logs about previous versions. In particular the
50  // initial stability log refers to the previous run, which can be an older
51  // version. This field is set by the client when the log being written has an
52  // app_version that's different than the version of the app writing the log.
53  // Note that the version uploading the log may also be different.
54  optional string log_written_by_app_version = 40;
55
56  // The brand code or distribution tag assigned to a partner, if available.
57  // Windows, Mac, iOS, and CrOS clients may have a brand code.
58  optional string brand_code = 12;
59
60  enum Channel {
61    CHANNEL_UNKNOWN = 0;  // Unknown channel -- perhaps an unofficial build?
62    CHANNEL_CANARY = 1;
63    CHANNEL_DEV = 2;
64    CHANNEL_BETA = 3;
65    CHANNEL_STABLE = 4;
66  }
67  optional Channel channel = 10;
68
69  // True for a client following updates on the extended stable channel;
70  // see go/chrome-extended-dd.
71  optional bool is_extended_stable_channel = 36 [default = false];
72
73  // True if Chrome build is instrumented (e.g. built with ASAN instrumentation
74  // or with DCHECKs enabled).
75  // This field was renamed from |is_asan_build| to reflect its actual meaning.
76  optional bool is_instrumented_build = 20 [default = false];
77
78  // For Chrome, the date the user enabled UMA, in seconds since the epoch.
79  // If the user has toggled the UMA enabled state multiple times, this will
80  // be the most recent date on which UMA was enabled.
81  // For privacy, this is rounded to the nearest hour (M30+).
82  // For WebView, the field stores the date "January 1st, 2014 00:00:00 UTC"
83  // if the user opted into metrics collection before WebView started tracking
84  // this information. Otherwise, the field value should correctly reflect the
85  // first startup for this app after the user opted into metrics collection.
86  optional int64 uma_enabled_date = 3;
87
88  // The time when the client was installed, in seconds since the epoch.
89  // For privacy, this is rounded to the nearest hour.
90  optional int64 install_date = 16;
91
92  // A message about the cloned install detection that helps improve data
93  // quality by identifying potential VMs and bots. This message will be
94  // set in every record after the client has ever been reset due to cloned
95  // install detection. However, the `cloned_from_client_id`
96  // field will only be set in the resetting session because this is not
97  // persisted in the local prefs.
98  // Next tag: 5
99  message ClonedInstallInfo {
100    // The latest timestamp we reset a cloned client’s client id, in seconds
101    // since the epoch. For privacy, this is rounded to the nearest hour.
102    optional int64 last_timestamp = 1;
103
104    // The client_id that this client is cloned from. This field is tied to the
105    // cloned install detector only; any other way of resetting client_id
106    // doesn't touch this field. This field is only reported in the
107    // resetting session.
108    optional fixed64 cloned_from_client_id = 2;
109
110    // The first timestamp when we reset a cloned client’s client id, in seconds
111    // since the epoch. For privacy, this is rounded to the nearest hour.
112    optional int64 first_timestamp = 3;
113
114    // The number of times this client has been reset due to cloned install.
115    // Increment by one per reset happens.
116    optional int32 count = 4;
117  }
118  optional ClonedInstallInfo cloned_install_info = 39;
119
120  // The non-identifying low entropy source value. This value seeds the
121  // pseudorandom generator which picks experimental groups. Clients only report
122  // the value that they used for picking experimental groups on startup which
123  // means this value won't be changed within the session even even if the low
124  // entropy source is reset (e.g. via the UMA checkbox) because group
125  // assignments won't be changed until restart.
126  optional int32 low_entropy_source = 31;
127
128  // The old low entropy value. This value is thought to be biased in the wild,
129  // and is no longer used for experiments requiring low entropy. Clients which
130  // already have an "old" value continue incorporating it into the high entropy
131  // source, to avoid changing those group assignments. New clients only have
132  // the new source.
133  optional int32 old_low_entropy_source = 32;
134
135  // A pseudo low entropy value. The actual low_entropy_source value is used for
136  // assignment to experiment arms, and this use may cause drift over time (for
137  // example, if a bad experiment arm drives away some users permanently.) This
138  // pseudo low entropy value is generated identically to low_entropy_source,
139  // but it is generated with a different randomization seed and is not used for
140  // experiment randomization. Consequently, it can be used in statistical
141  // validation to answer the question of how our data would be distributed if
142  // we didn't have to worry about low entropy source drift.
143  optional int32 pseudo_low_entropy_source = 37;
144
145  // The user's selected application locale, i.e. the user interface language.
146  // The locale includes a language code and, possibly, also a country code,
147  // e.g. "en-US".
148  optional string application_locale = 4;
149
150  // Hashes of command line keys used in the browser session when the MetricsLog
151  // is created. This takes into account the command line switches that were
152  // used when launching the session, as well as any modifications made to them,
153  // for example via CommandLine::AppendSwitch and CommandLine::RemoveSwitch.
154  // Values are the lower 32-bit of SHA1 hash in little-endian.
155  repeated fixed32 command_line_key_hash = 38 [packed = true];
156
157  // Information on the user's operating system.
158  // Next tag: 11
159  message OS {
160    // The user's operating system. This should be one of:
161    // - 'Android'
162    // - 'Windows NT'
163    // - 'CrOS' (as of 07/2020)
164    // - 'Lacros'  (the Lacros browser runs on Chrome OS, but reports a special
165    //              OS name to differentiate itself from the built-in ash
166    //              browser + window manager binary.)
167    // - 'Linux' (includes ChromeOS prior to 07/2020)
168    // - 'iOS' (iOS versions >= 9)
169    // - 'iPhone OS' (iOS versions <= 8)
170    // - 'iPadOS'
171    // - 'Mac OS X'
172    optional string name = 1;
173
174    // The version of the OS.  The meaning of this field is OS-dependent.
175    optional string version = 2;
176
177    // The fingerprint of the build.  This field is used only on Android.
178    optional string build_fingerprint = 3;
179
180    // Whether the version of iOS appears to be "jailbroken". This field is
181    // used only on iOS. Chrome for iOS detects whether device contains a
182    // DynamicLibraries/ directory. It's a necessary but insufficient indicator
183    // of whether the operating system has been jailbroken.
184    // Deprecated 01/2023. This was never set.
185    optional bool DEPRECATED_is_jailbroken = 4 [deprecated = true];
186
187    // The build number for the OS version. The same OS version may have a
188    // different build number. The meaning of this field is OS-dependent.
189    optional string build_number = 5;
190
191    // The version of the kernel. Linux based operating systems, such as
192    // ChromeOS and Android, have a kernel version that the OS release version
193    // was built with that differs from the version field above.
194    optional string kernel_version = 6;
195
196    // Information on ChromeOS ARC runtime. This is collected to ease analysis
197    // on ARC-specific metrics, since this info varies by different boards /
198    // build configs / releases.
199    // Next tag: 2
200    message Arc {
201      // Android release number from build.prop "ro.build.version.release", e.g.
202      // "7.1.1" for N and "9" for P.
203      optional string release = 1;
204    }
205    // Available since M76. This field is reported if current build supports
206    // ARC, regardless of whether ARC is enabled or not. Check "Arc.State"
207    // histogram to determine if ARC is enabled for current report.
208    // Logged on ChromeOS only.
209    optional Arc arc = 7;
210
211    // Data related to system-level dark mode configuration. This is currently
212    // only uploaded on Android. "*_APP" variants are included to reflect when
213    // the user overrides the system configuration within the browser
214    enum DarkModeState {
215      UNKNOWN = 0;
216
217      // Both the system and the browser are in dark mode.
218      DARK_MODE_SYSTEM = 1;
219
220      // The browser is in dark mode, but the state of the system either cannot
221      // be determined or has been overridden by the user.
222      DARK_MODE_APP = 2;
223
224      // Both the system and the browser are in light mode.
225      LIGHT_MODE_SYSTEM = 3;
226
227      // The browser is in light mode, but the state of the system either cannot
228      // be determined or has been overridden by the user.
229      LIGHT_MODE_APP = 4;
230    }
231    optional DarkModeState dark_mode_state = 8 [default = UNKNOWN];
232
233    // The value returned by the "XDG_SESSION_TYPE" environment variable, as
234    // translated to a base::nix::SessionType, this field is only set on Linux.
235    // Some features are enabled/disabled depending on this value.
236    enum XdgSessionType {
237      UNSET = 0;
238      OTHER_SESSION_TYPE = 1;
239      UNSPECIFIED = 2;
240      TTY = 3;
241      X11 = 4;
242      WAYLAND = 5;
243      MIR = 6;
244    }
245    optional XdgSessionType xdg_session_type = 9;
246
247    // The value returned by the "XDG_CURRENT_DESKTOP" environment variable, as
248    // translated to a base::nix::DesktopEnvironment. Note that all KDE values
249    // from that enum are bucketed together. This field is only set on Linux.
250    // Some bugs reproduce only in particular desktop environments.
251    enum XdgCurrentDesktop {
252      OTHER = 0;
253      CINNAMON = 1;
254      DEEPIN = 2;
255      GNOME = 3;
256      KDE = 4;
257      PANTHEON = 5;
258      UKUI = 6;
259      UNITY = 7;
260      XFCE = 8;
261      LXQT = 9;
262    }
263    optional XdgCurrentDesktop xdg_current_desktop = 10;
264  }
265  optional OS os = 5;
266
267  // Information on the user's hardware.
268  // Next tag: 28
269  message Hardware {
270    // OS CPU architecture. Common options are: x86, x86_64, arm64, armv7,
271    // armv7l, armv8l and aarch64.
272    // Note: On Windows, this is not the true OS CPU architecture in the case
273    // of running under emulation (e.g. on Windows on ARM, which would report
274    // either x86 or x86_64, depending on the bitness of the exe being run).
275    // Started being correctly recorded on iOS in M90: crrev/c/2723012.
276    optional string cpu_architecture = 1;
277
278    // Browser process CPU architecture. Will be different from
279    // `cpu_architecture` in the case where Chromium runs non-natively (e.g.
280    // macOS Rosetta or Arm Windows). One of four values: x86, x86_64, ARM,
281    // ARM_64. Added in M90.
282    optional string app_cpu_architecture = 21;
283
284    // The amount of RAM present on the system, in megabytes.
285    optional int64 system_ram_mb = 2;
286
287    // The base memory address that chrome.dll was loaded at.
288    // (Logged only on Windows.)
289    optional int64 dll_base = 3;
290
291    // The hardware_class describes the current machine model, e.g. "MacPro1,1"
292    // on Mac, "iPhone9,3" on iOS or "Nexus 5" on Android. Implemented on OS X,
293    // iOS, Android, Chrome OS.
294    //
295    // The iOS device hardware class was added in Chrome M60 release. Prior
296    // to that, device hardware class was incorrectly recorded in
297    // cpu_architecture field.
298    //
299    // For Chrome OS, prior to M69, this field had the value that is
300    // currently in |full_hardware_class| field. In M69+, this contains the
301    // board name only. E.G. "CELES", "VEYRON_MINNIE".
302
303    optional string hardware_class = 4;
304
305    // This field is only sent on Chrome OS. The full hardware class is a unique
306    // string associated with each Chrome OS device product revision generally
307    // assigned at hardware qualification time. The hardware class effectively
308    // identifies the configured system components such as CPU, WiFi adapter,
309    // etc.
310    //
311    // An example of such a hardware class is "IEC MARIO PONY 6101".  An
312    // internal database associates this hardware class with the qualified
313    // device specifications including OEM information, schematics, hardware
314    // qualification reports, test device tags, etc.
315    optional string full_hardware_class = 18;
316
317    // This field is only sent on Chrome OS devices with cellular support.
318    // This represents the variant of cellular modem present on the device.
319    optional string cellular_device_variant = 24;
320
321    // The number of physical screens.
322    optional int32 screen_count = 5;
323
324    // The screen dimensions of the primary screen, in pixels.
325    optional int32 primary_screen_width = 6;
326    optional int32 primary_screen_height = 7;
327
328    // The device scale factor of the primary screen.
329    optional float primary_screen_scale_factor = 12;
330
331    // Max DPI for any attached screen. (Windows only)
332    optional float max_dpi_x = 9;
333    optional float max_dpi_y = 10;
334
335    // The form factor of the device. Added in M101, foldable added in M120.
336    // Android devices can be phone, tablet, TV, automotive or foldable. iOS
337    // devices can be phone or tablet. For Windows, Mac, ChromeOS, Lacros, and
338    // Linux, the desktop form factor is always used.
339    enum FormFactor {
340      FORM_FACTOR_UNKNOWN = 0;
341      FORM_FACTOR_DESKTOP = 1;
342      FORM_FACTOR_PHONE = 2;
343      FORM_FACTOR_TABLET = 3;
344      FORM_FACTOR_TV = 4;
345      FORM_FACTOR_MEET_DEVICE = 5;
346      FORM_FACTOR_AUTOMOTIVE = 6;
347      FORM_FACTOR_FOLDABLE = 7;
348    }
349    optional FormFactor form_factor = 22;
350
351    // Information on the CPU obtained by CPUID.
352    message CPU {
353      // A 12 character string naming the vendor, e.g. "GenuineIntel".
354      optional string vendor_name = 1;
355
356      // The signature reported by CPUID (from EAX).
357      optional uint32 signature = 2;
358
359      // Number of logical processors/cores on the current machine, which
360      // includes hyperthreaded cores.
361      optional uint32 num_cores = 3;
362
363      // Whether the CPU is running in a hypervisor.
364      optional bool is_hypervisor = 4;
365    }
366    optional CPU cpu = 13;
367
368    // Type of BIOS (can change at each boot).
369    enum BiosType {
370      BIOS_TYPE_UNKNOWN = 0;
371      // Legacy BIOS or UEFI with CSM mode.
372      BIOS_TYPE_LEGACY = 1;
373      // BIOS is UEFI and booted into UEFI mode.
374      BIOS_TYPE_UEFI = 2;
375    }
376    // Motherboard information.
377    message Motherboard {
378      // Manufacturer for the motherboard.
379      optional string manufacturer = 1;
380      // Model for the motherboard.
381      optional string model = 2;
382      // Manufacturer for the BIOS.
383      optional string bios_manufacturer = 3;
384      // Version of the BIOS currently installed.
385      optional string bios_version = 4;
386      // What mode of BIOS is booted.
387      optional BiosType bios_type = 5;
388    }
389    optional Motherboard motherboard = 25;
390
391    // Information on the GPU
392    message Graphics {
393      // The GPU manufacturer's vendor id.
394      optional uint32 vendor_id = 1;
395
396      // The GPU manufacturer's device id for the chip set.
397      optional uint32 device_id = 2;
398
399      // The driver version on the GPU.
400      optional string driver_version = 3;
401
402      // The GL_VENDOR string. An example of a gl_vendor string is
403      // "Imagination Technologies". "" if we are not using OpenGL.
404      optional string gl_vendor = 6;
405
406      // The GL_RENDERER string. An example of a gl_renderer string is
407      // "PowerVR SGX 540". "" if we are not using OpenGL.
408      optional string gl_renderer = 7;
409    }
410    optional Graphics gpu = 8;
411
412    // Whether the internal display produces touch events. Omitted if unknown.
413    // Logged on ChromeOS only.
414    optional bool internal_display_supports_touch = 14;
415
416    // Internal storage device information on ChromeOS. Added in M94.
417    // Next tag: 9
418    message InternalStorageDevice {
419      // Id of the storage device manufacturer.
420      // Can be vendor_id (for NVMe, 32bit), manfid (for eMMC, 16bit, since
421      // M113), oemid (for eMMC, 16bit, before M113), JEDEC manfid (for UFS,
422      // 16bit) etc. depending on the device type.
423      optional uint32 vendor_id = 1;
424
425      // Id of the storage device product.
426      // Can be product_id (for NVMe, 32bit), PNM (for eMMC, 48bit), hashed
427      // model name (for UFS, 32bit) etc. depending on the device type.
428      optional uint64 product_id = 2;
429
430      // Revision of the storage device product.
431      // Can be PCIe rev (for NVMe, 8bit), PRV(for eMMC, 8bit) etc. depending on
432      // the device type.
433      optional uint32 revision = 3;
434
435      // Storage Device model. Comes from /sys/block/<device>/device/model.
436      optional string model = 4;
437
438      // Storage Device capacity in MB.
439      optional uint32 size_mb = 5;
440
441      // 8 byte FW revision of a storage device. Usually a string, but may
442      // contain non-printable characters.
443      optional uint64 firmware_version = 6;
444
445      // Type of the storage device interface.
446      // TYPE_UNKNOWN signifies an error on population side.
447      enum Type {
448        TYPE_UNKNOWN = 0;
449        TYPE_EMMC = 1;
450        TYPE_NVME = 2;
451        TYPE_UFS = 3;
452        TYPE_SD_EXPRESS_INTERNAL = 4;
453      }
454      optional Type type = 7;
455
456      // Purpose defines how the OS uses the device.
457      // PURPOSE_UNKNOWN signifies an error on population side.
458      enum Purpose {
459        PURPOSE_UNKNOWN = 0;
460        PURPOSE_BOOT = 1;
461        PURPOSE_SWAP = 2;
462        PURPOSE_BOOT_SWAP = 3;
463      }
464      optional Purpose purpose = 8;
465    }
466    // List of internal storage devices on a Chrome OS device.
467    repeated InternalStorageDevice internal_storage_devices = 20;
468
469    // Drive messages are currently logged on Windows 7+, iOS, and Android.
470    message Drive {
471      // Whether this drive incurs a time penalty when randomly accessed. This
472      // should be true for spinning disks but false for SSDs or other
473      // flash-based drives.
474      optional bool has_seek_penalty = 1;
475    }
476    // The drive that the application executable was loaded from.
477    optional Drive app_drive = 16;
478    // The drive that the current user data directory was loaded from.
479    optional Drive user_data_drive = 17;
480
481    // Type of TPM on the device. This field is only filled in on ChromeOS
482    // devices (both CrOS and LaCrOS platforms). This includes Chromebooks with
483    // TPM1.2 or GSC (cr50 and ti50), flex devices (ChromeOS installed on
484    // devices with other OS) which has TPM type "runtime selection", and lastly
485    // generic TPM2 devices that use TPM2 chips that aren't manufactured by
486    // Google.
487    enum TpmType {
488      TPM_TYPE_UNKNOWN = 0;
489      TPM_TYPE_1 = 1;
490      TPM_TYPE_CR50 = 2;
491      TPM_TYPE_TI50 = 3;
492      TPM_TYPE_RUNTIME_SELECTION = 4;
493      TPM_TYPE_GENERIC_2 = 5;
494    }
495    optional TpmType tpm_type = 23;
496
497    // Firmware version of the TPM on the device. This field is only filled in
498    // on ChromeOS devices (both CrOS and LaCrOS platforms).
499    optional uint64 tpm_firmware_version = 26;
500
501    // RW Firmware version of the TPM on the device. This field is only filled
502    // in on ChromeOS devices.
503    optional string tpm_rw_firmware_version = 27;
504  }
505  optional Hardware hardware = 6;
506
507  // Information about the network connection.
508  // Next tag: 9
509  message Network {
510    // Set to true if connection_type changed during the lifetime of the log.
511    optional bool connection_type_is_ambiguous = 1;
512
513    // Derived from net::NetworkChangeNotifier::ConnectionType translated
514    // through NetworkMetricsProvider::GetConnectionType.
515    enum ConnectionType {
516      CONNECTION_UNKNOWN = 0;
517      CONNECTION_ETHERNET = 1;
518      CONNECTION_WIFI = 2;
519      CONNECTION_2G = 3;
520      CONNECTION_3G = 4;
521      CONNECTION_4G = 5;
522      CONNECTION_BLUETOOTH = 6;
523      CONNECTION_NONE = 7;
524      // As an alternative to connection_type_is_ambiguous above,
525      // CONNECTION_AMBIGUOUS can be used for connection_type instead. This is
526      // to be used in logs processing as a more convenient way to manage the
527      // ambiguous case when breaking down stats by connection_type.
528      CONNECTION_AMBIGUOUS = 8;
529      CONNECTION_5G = 9;
530    }
531    // The connection type according to NetworkChangeNotifier.
532    optional ConnectionType connection_type = 2;
533
534    // Set to true if wifi_phy_layer_protocol changed during the lifetime of the
535    // log.
536    optional bool wifi_phy_layer_protocol_is_ambiguous = 3;
537
538    // See net::WifiPHYLayerProtocol.
539    enum WifiPHYLayerProtocol {
540      WIFI_PHY_LAYER_PROTOCOL_NONE = 0;
541      WIFI_PHY_LAYER_PROTOCOL_ANCIENT = 1;
542      WIFI_PHY_LAYER_PROTOCOL_A = 2;
543      WIFI_PHY_LAYER_PROTOCOL_B = 3;
544      WIFI_PHY_LAYER_PROTOCOL_G = 4;
545      WIFI_PHY_LAYER_PROTOCOL_N = 5;
546      WIFI_PHY_LAYER_PROTOCOL_UNKNOWN = 6;
547      WIFI_PHY_LAYER_PROTOCOL_AC = 7;
548      WIFI_PHY_LAYER_PROTOCOL_AD = 8;
549      WIFI_PHY_LAYER_PROTOCOL_AX = 9;
550    }
551    // The physical layer mode of the associated wifi access point, if any.
552    optional WifiPHYLayerProtocol wifi_phy_layer_protocol = 4;
553
554    // Derived from net::NetworkQualityEstimator::EffectiveConnectionType
555    // translated through NetworkMetricsProvider::GetConnectionType.
556    enum EffectiveConnectionType {
557      EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0;
558      // Deprecated: Specifies that the connection_type changed during the
559      // lifetime of the log.
560      DEPRECATED_EFFECTIVE_CONNECTION_TYPE_AMBIGUOUS = 1 [deprecated = true];
561      EFFECTIVE_CONNECTION_TYPE_OFFLINE = 2;
562      EFFECTIVE_CONNECTION_TYPE_SLOW_2G = 3;
563      EFFECTIVE_CONNECTION_TYPE_2G = 4;
564      EFFECTIVE_CONNECTION_TYPE_3G = 5;
565      EFFECTIVE_CONNECTION_TYPE_4G = 6;
566    }
567
568    // The minimum and maximum values of the effective connection type enum
569    // during the lifetime of the log according to net::NetworkQualityEstimator.
570    // EffectiveConnectionType is the connection type whose typical performance
571    // is most similar to the measured performance of the network in use. In
572    // many cases, the "effective" connection type and the actual type of
573    // connection in use are the same, but often a network connection performs
574    // significantly differently, usually worse, from its expected capabilities.
575    optional EffectiveConnectionType min_effective_connection_type = 7;
576    optional EffectiveConnectionType max_effective_connection_type = 8;
577  }
578  optional Network network = 13;
579
580  // Information on the Google Update install that is managing this client.
581  message GoogleUpdate {
582    // Whether the Google Update install is system-level or user-level.
583    optional bool is_system_install = 1;
584
585    // The date at which Google Update last started performing an automatic
586    // update check, in seconds since the Unix epoch.
587    optional int64 last_automatic_start_timestamp = 2;
588
589    // The date at which Google Update last successfully sent an update check
590    // and received an intact response from the server, in seconds since the
591    // Unix epoch. (The updates don't need to be successfully installed.)
592    optional int64 last_update_check_timestamp = 3;
593
594    // Describes a product being managed by Google Update. (This can also
595    // describe Google Update itself.)
596    message ProductInfo {
597      // The current version of the product that is installed.
598      optional string version = 1;
599
600      // The date at which Google Update successfully updated this product,
601      // stored in seconds since the Unix epoch.  This is updated when an update
602      // is successfully applied, or if the server reports that no update
603      // is available.
604      optional int64 last_update_success_timestamp = 2;
605
606      // The result reported by the product updater on its last run.
607      enum InstallResult {
608        INSTALL_RESULT_SUCCESS = 0;
609        INSTALL_RESULT_FAILED_CUSTOM_ERROR = 1;
610        INSTALL_RESULT_FAILED_MSI_ERROR = 2;
611        INSTALL_RESULT_FAILED_SYSTEM_ERROR = 3;
612        INSTALL_RESULT_EXIT_CODE = 4;
613      }
614      optional InstallResult last_result = 3;
615
616      // The error code reported by the product updater on its last run.  This
617      // will typically be a error code specific to the product installer.
618      optional int32 last_error = 4;
619
620      // The extra error code reported by the product updater on its last run.
621      // This will typically be a Win32 error code.
622      optional int32 last_extra_error = 5;
623    }
624    optional ProductInfo google_update_status = 4;
625    optional ProductInfo client_status = 5;
626  }
627  optional GoogleUpdate google_update = 11;
628
629  // Figures that can be used to generate application stability metrics.
630  // All values are counts of events since the last time that these
631  // values were reported.
632  // Next tag: 32
633  message Stability {
634    // Total amount of time that the program was running, in seconds,
635    // since the last time a log was recorded, as measured using a client-side
636    // clock implemented via TimeTicks, which guarantees that it is monotonic
637    // and does not jump if the user changes their clock.  The TimeTicks
638    // implementation also makes the clock not count time the computer is
639    // suspended.
640    optional int64 incremental_uptime_sec = 1;
641
642    // Total amount of time that the program was running, in seconds,
643    // since startup, as measured using a client-side clock implemented
644    // via TimeTicks, which guarantees that it is monotonic and does not
645    // jump if the user changes their clock.  The TimeTicks implementation
646    // also makes the clock not count time the computer is suspended.
647    // This field was added for M-35.
648    optional int64 uptime_sec = 23;
649
650    // Logged on Android only as of late Q2 2022. Used by only Android WebView.
651    // Other platforms should use Stability.Counts2.
652    optional int32 page_load_count = 2;
653
654    // Logged on Android only as of Q2 2022. Used by only Android WebView. Other
655    // platforms should use Stability.Counts2.
656    optional int32 renderer_launch_count = 26;
657
658    // Number of times the browser has crashed while logged in as the "other
659    // user" (guest) account.
660    // Logged on ChromeOS only.
661    optional int32 other_user_crash_count = 7;
662
663    // Number of times the kernel has crashed.
664    // Logged on ChromeOS only.
665    optional int32 kernel_crash_count = 8;
666
667    // Number of times the system has shut down uncleanly.
668    // Logged on ChromeOS only.
669    optional int32 unclean_system_shutdown_count = 9;
670
671    // All the remaining fields in the Stability are recorded at most once per
672    // client session.
673
674    // The number of times the program was launched since the last time metrics
675    // was uploaded. For the initial metrics upload (right after startup), this
676    // will often be equal to 1. However, it is possible that Chrome was unable
677    // to upload stability metrics for previous launches (e.g. due to crashing
678    // early during startup), making this value greater than 1. For subsequent
679    // metrics uploads, this value will be 0.
680    //
681    // Logged on Android only as of Q1 2022. Used by only Android WebView. Other
682    // platforms should use Stability.Counts2.
683    optional int32 launch_count = 15;
684    // Android only. The number of times Chrome didn't exit cleanly and the GMS
685    // Core version has changed from the last session. This is in addition to
686    // |crash_count| in which we exclude unclean exits that are likely caused by
687    // GMS Core updates.
688    optional int32 crash_count_due_to_gms_core_update = 30;
689
690    // Whether the metrics being reported are from a previous run picked up via
691    // the left-over memory mapped files.
692    optional bool from_previous_run = 29;
693  }
694  optional Stability stability = 8;
695
696  // Description of a field trial or experiment that the user is currently
697  // enrolled in.
698  // All metrics reported in this upload can potentially be influenced by the
699  // field trial.
700  message FieldTrial {
701    // The name of the field trial, as a 32-bit identifier.
702    // Currently, the identifier is a hash of the field trial's name.
703    optional fixed32 name_id = 1;
704
705    // The user's group within the field trial, as a 32-bit identifier.
706    // Currently, the identifier is a hash of the group's name.
707    optional fixed32 group_id = 2;
708  }
709  repeated FieldTrial field_trial = 9;
710
711  // Seed version from variations_seed.proto used to instantiate FieldTrials
712  // for this session.
713  optional string variations_seed_version = 28;
714
715  // Whether the client_id in the log matches the client_id we used to assign
716  // field trials.
717  optional bool client_id_was_used_for_trial_assignment = 33;
718
719  // The unhashed client_id for this report. This is a uuid in its canonical
720  // textual representation in the form 8-4-4-4-12 for a total of 36 characters.
721  // Used to simulate field trial assignments for the client.
722  optional string client_uuid = 34;
723
724  // The session's hash. At the beginning of a Chrome session, a random number
725  // will be generated, and all logs from that session will have this field set
726  // to that number. This is kept track of properly even when creating logs from
727  // previous sessions (e.g. independent logs from PMA files and stability
728  // logs), which is not the case for the `session_id` field in
729  // ChromeUserMetricsExtension. A benefit of this is that this can
730  // differentiate sessions between cloned installs that may report the same
731  // `session_id` but are actually different sessions.
732  optional fixed64 session_hash = 46;
733
734  // Information about the A/V output device(s) (typically just a TV).
735  // However, a configuration may have one or more intermediate A/V devices
736  // between the source device and the TV (e.g. an A/V receiver, video
737  // processor, etc.).
738  message ExternalAudioVideoDevice {
739    // The manufacturer name (possibly encoded as a 3-letter code, e.g. "YMH"
740    // for Yamaha).
741    optional string manufacturer_name = 1;
742
743    // The model name (e.g. "RX-V1900"). Some devices may report generic names
744    // like "receiver" or use the full manufacturer name (e.g "PHILIPS").
745    optional string model_name = 2;
746
747    // The product code (e.g. "0218").
748    optional string product_code = 3;
749
750    // The device types. A single device can have multiple types (e.g. a set-top
751    // box could be both a tuner and a player).  The same type may even be
752    // repeated (e.g a device that reports two tuners).
753    enum AVDeviceType {
754      AV_DEVICE_TYPE_UNKNOWN = 0;
755      AV_DEVICE_TYPE_TV = 1;
756      AV_DEVICE_TYPE_RECORDER = 2;
757      AV_DEVICE_TYPE_TUNER = 3;
758      AV_DEVICE_TYPE_PLAYER = 4;
759      AV_DEVICE_TYPE_AUDIO_SYSTEM = 5;
760    }
761    repeated AVDeviceType av_device_type = 4;
762
763    // The year of manufacture.
764    optional int32 manufacture_year = 5;
765
766    // The week of manufacture.
767    // Note: per the Wikipedia EDID article, numbering for this field may not
768    // be consistent between manufacturers.
769    optional int32 manufacture_week = 6;
770
771    // Selected horizontal resolution in pixels.
772    optional int32 horizontal_resolution = 7;
773
774    // Selected vertical resolution in pixels.
775    optional int32 vertical_resolution = 8;
776
777    // Audio capabilities of the device.
778    // Ref: http://en.wikipedia.org/wiki/Extended_display_identification_data
779    // Next tag: 7
780    message AudioDescription {
781      // Audio format
782      enum AudioFormat {
783        AUDIO_FORMAT_UNKNOWN = 0;
784        AUDIO_FORMAT_LPCM = 1;
785        AUDIO_FORMAT_AC_3 = 2;
786        AUDIO_FORMAT_MPEG1 = 3;
787        AUDIO_FORMAT_MP3 = 4;
788        AUDIO_FORMAT_MPEG2 = 5;
789        AUDIO_FORMAT_AAC = 6;
790        AUDIO_FORMAT_DTS = 7;
791        AUDIO_FORMAT_ATRAC = 8;
792        AUDIO_FORMAT_ONE_BIT = 9;
793        AUDIO_FORMAT_DD_PLUS = 10;
794        AUDIO_FORMAT_DTS_HD = 11;
795        AUDIO_FORMAT_MLP_DOLBY_TRUEHD = 12;
796        AUDIO_FORMAT_DST_AUDIO = 13;
797        AUDIO_FORMAT_MICROSOFT_WMA_PRO = 14;
798      }
799      optional AudioFormat audio_format = 1;
800
801      // Number of channels (e.g. 1, 2, 8, etc.).
802      optional int32 num_channels = 2;
803
804      // Supported sample frequencies in Hz (e.g. 32000, 44100, etc.).
805      // Multiple frequencies may be specified.
806      repeated int32 sample_frequency_hz = 3;
807
808      // Maximum bit rate in bits/s.
809      optional int32 max_bit_rate_per_second = 4;
810
811      // Bit depth (e.g. 16, 20, 24, etc.).
812      optional int32 bit_depth = 5;
813
814      // Output mode: analog vs digital.
815      enum OutputMode {
816        ANALOG = 0;
817        DIGITAL = 1;
818      }
819      optional OutputMode output_mode = 6;
820    }
821    repeated AudioDescription audio_description = 9;
822
823    // The position in AV setup.
824    // A value of 0 means this device is the TV.
825    // A value of 1 means this device is directly connected to one of
826    // the TV's inputs.
827    // Values > 1 indicate there are 1 or more devices between this device
828    // and the TV.
829    optional int32 position_in_setup = 10;
830
831    // Whether this device is in the path to the TV.
832    optional bool is_in_path_to_tv = 11;
833
834    // The CEC version the device supports.
835    // CEC stands for Consumer Electronics Control, a part of the HDMI
836    // specification.  Not all HDMI devices support CEC.
837    // Only devices that support CEC will report a value here.
838    optional int32 cec_version = 12;
839
840    // This message reports CEC commands seen by a device.
841    // After each log is sent, this information is cleared and gathered again.
842    // By collecting CEC status information by opcode we can determine
843    // which CEC features can be supported.
844    message CECCommand {
845      // The CEC command opcode.  CEC supports up to 256 opcodes.
846      // We add only one CECCommand message per unique opcode.  Only opcodes
847      // seen by the device will be reported. The remainder of the message
848      // accumulates status for this opcode (and device).
849      optional int32 opcode = 1;
850
851      // The total number of commands received from the external device.
852      optional int32 num_received_direct = 2;
853
854      // The number of commands received from the external device as part of a
855      // broadcast message.
856      optional int32 num_received_broadcast = 3;
857
858      // The total number of commands sent to the external device.
859      optional int32 num_sent_direct = 4;
860
861      // The number of commands sent to the external device as part of a
862      // broadcast message.
863      optional int32 num_sent_broadcast = 5;
864
865      // The number of aborted commands for unknown reasons.
866      optional int32 num_aborted_unknown_reason = 6;
867
868      // The number of aborted commands because of an unrecognized opcode.
869      optional int32 num_aborted_unrecognized = 7;
870    }
871    repeated CECCommand cec_command = 13;
872
873    // Selected Frame rate
874    optional int32 frame_rate = 14;
875
876    // Selected color encoding.
877    enum ColorEncoding {
878      COLOR_ENCODING_UNKNOWN = 0;
879      COLOR_ENCODING_RGB = 1;
880      COLOR_ENCODING_YUV444 = 2;
881      COLOR_ENCODING_YUV422 = 3;
882      COLOR_ENCODING_YUV420 = 4;
883    }
884    optional ColorEncoding color_encoding = 15;
885
886    // Selected bit-depth.
887    optional int32 bit_depth = 16;
888
889    // Devices's max TMDS char rate.
890    optional int32 tmds = 17;
891
892    // HDR10 support.
893    optional bool hdr10_support = 18;
894
895    // Dolby vision support.
896    optional bool dolby_vision_support = 19;
897
898    // Supported EOTF's.
899    // EOTF support according to the spec:
900    //   eotf_support & 0x1 -> SDR supported
901    //   (eotf_support > 1) & 0x1 -> traditional HDR supported
902    //   (eotf_support > 2) & 0x1 -> ST2084 supported
903    optional int32 eotf_support = 20;
904
905    // Supports YUV.
906    optional bool yuv_support = 21;
907
908    // Supports YUV_420.
909    optional bool yuv_420_support = 22;
910
911    // The maximum HDCP version supported by the sink.
912    optional int32 maximum_supported_hdcp_version = 23;
913
914    // The current HDCP version negotiated with the sink.
915    optional int32 current_hdcp_version = 24;
916  }
917  repeated ExternalAudioVideoDevice external_audio_video_device = 14;
918
919  // Information about the current wireless access point. Collected directly
920  // from the wireless access point via standard apis if the device is
921  // connected to the Internet wirelessly. Introduced for Chrome on TV devices
922  // but also can be collected by cast devices running Chrome OS and Android.
923  // Not logged by Chrome browser platforms.
924  message ExternalAccessPoint {
925    // The manufacturer name, for example "ASUSTeK Computer Inc.".
926    optional string manufacturer = 1;
927
928    // The model name, for example "Wi-Fi Protected Setup Router".
929    optional string model_name = 2;
930
931    // The model number, for example "RT-N16".
932    optional string model_number = 3;
933
934    // The device name (sometime same as model_number), for example "RT-N16".
935    optional string device_name = 4;
936
937    // The organizationally unique identifier, for example "08:9E:08".
938    // OUI is the highest three bytes of MAC address
939    // Google's OUI (08:9E:08) is encoded as 0x00089E08
940    // Never recorded server side, but some old clients may send values with
941    // this tag.
942    reserved 5;
943  }
944  optional ExternalAccessPoint external_access_point = 15;
945
946  // Number of users currently signed into a multiprofile session.
947  // A zero value indicates that the user count changed while the log is open.
948  // Logged only on ChromeOS.
949  optional uint32 multi_profile_user_count = 17;
950
951  // Information about extensions that are installed, masked to provide better
952  // privacy.  Only extensions from a single profile are reported; this will
953  // generally be the profile used when the browser is started.  The profile
954  // reported on will remain consistent at least until the browser is
955  // relaunched (or the profile is deleted by the user).
956  //
957  // Each client first picks a value for client_key derived from its UMA
958  // client_id:
959  //   client_key = client_id % 4096
960  // Then, each installed extension is mapped into a hash bucket according to
961  //   bucket = CityHash64(StringPrintf("%d:%s",
962  //                                    client_key, extension_id)) % 1024
963  // The client reports the set of hash buckets occupied by all installed
964  // extensions.  If multiple extensions map to the same bucket, that bucket is
965  // still only reported once.
966  repeated int32 occupied_extension_bucket = 18;
967
968  // The state of loaded extensions for this system. The system can have either
969  // no applicable extensions, extensions only from the webstore and verified by
970  // the webstore, extensions only from the webstore but not verified, or
971  // extensions not from the store. If there is a single off-store extension,
972  // then HAS_OFFSTORE is reported. This should be kept in sync with the
973  // corresponding enum in chrome/browser/metrics/extensions_metrics_provider.cc
974  enum ExtensionsState {
975    NO_EXTENSIONS = 0;
976    NO_OFFSTORE_VERIFIED = 1;
977    NO_OFFSTORE_UNVERIFIED = 2;
978    HAS_OFFSTORE = 3;
979  }
980  optional ExtensionsState offstore_extensions_state = 19;
981
982  // The nature of the choice the user was given concerning metrics recording.
983  // Specifically, whether the enable metrics/crash reporting checkbox that was
984  // shown on first run was checked or unchecked by default.
985  // This state is recorded on first run, and uploaded in every UMA log.
986  enum UmaDefaultState {
987    // The enable checkbox was unchecked by default.
988    OPT_IN = 0;
989    // The enable checkbox was checked by default.
990    OPT_OUT = 1;
991    // Policy mandated that UMA be enabled, the user had no choice.
992    POLICY_FORCED_ENABLED = 2;
993    // The client has no record of which consent flow was used.
994    OPT_UNKNOWN = 3;
995  }
996  optional UmaDefaultState uma_default_state = 22;
997
998  enum AntiVirusState {
999    // The security product software is turned on and protecting the user.
1000    STATE_ON = 0;
1001    // The security product software is turned off and protection is disabled.
1002    STATE_OFF = 1;
1003    // The security product software is in the snoozed state, temporarily off,
1004    // and not actively protecting the computer.
1005    STATE_SNOOZED = 2;
1006    // The security product software has expired and is no longer actively
1007    // protecting the computer.
1008    STATE_EXPIRED = 3;
1009  }
1010
1011  // Information about installed antivirus products. Windows only. See
1012  // https://cs.chromium.org/chromium/src/chrome/browser/metrics/antivirus_metrics_provider_win.cc.
1013  //
1014  // Next Tag: 6
1015  message AntiVirusProduct {
1016    // The product name e.g. "System Center Endpoint Protection". This might not
1017    // be recorded, see ShouldReportFullNames() in
1018    // chrome/browser/metrics/antivirus_metrics_provider_win.cc.
1019    optional string product_name = 1;
1020
1021    // The hash of the product name.
1022    optional fixed32 product_name_hash = 2;
1023
1024    // The version of the product, as read from the file information. This might
1025    // not be recorded, see ShouldReportFullNames() in
1026    // chrome/browser/metrics/antivirus_metrics_provider_win.cc.
1027    optional string product_version = 3;
1028
1029    // The hash of the product version. Might not be set if the product version
1030    // could not be obtained from the disk.
1031    optional fixed32 product_version_hash = 4;
1032
1033    // The current state of the product.
1034    optional AntiVirusState product_state = 5;
1035  }
1036  repeated AntiVirusProduct antivirus_product = 23;
1037
1038  enum ComponentId {
1039    // The client transmitted a component ID the server does not recognize.
1040    UNKNOWN = 1;
1041
1042    // All the following are various components.
1043    FILE_TYPE_POLICIES = 2;
1044    ORIGIN_TRIALS = 3;
1045    PEPPER_FLASH = 4;
1046    PEPPER_FLASH_CHROMEOS = 5;
1047    PNACL = 6;
1048    RECOVERY = 7;
1049    SSL_ERROR_ASSISTANT = 8;
1050    STH_SET = 9;
1051    CRL_SET = 10;
1052    SUBRESOURCE_FILTER = 11;
1053    SW_REPORTER = 12;
1054    // Software Decryption CDM on all platforms of Chrome
1055    WIDEVINE_CDM = 13;
1056    EPSON_INKJET_PRINTER_ESCPR = 14;
1057    CROS_TERMINA = 15;
1058    STAR_CUPS_DRIVER = 16;
1059    SPEECH_SYNTHESIS_SV_SE = 17;
1060    OPTIMIZATION_HINTS = 18;
1061    DOWNLOADABLE_STRINGS = 19;
1062    VR_ASSETS = 20;
1063    RTANALYTICS_LIGHT = 21;
1064    RTANALYTICS_FULL = 22;
1065    CELLULAR = 23;
1066    DEMO_MODE_RESOURCES = 24;
1067    ON_DEVICE_HEAD_SUGGEST = 25;
1068    CROS_SMART_DIM = 26;
1069    ZXCVBN_DATA = 27;
1070    AUTOFILL_REGEX_CONSTANTS = 28;
1071    WEBVIEW_APPS_PACKAGE_NAMES_ALLOWLIST = 29;
1072    // Hardware Decryption CDM only for Chrome on Windows.
1073    MEDIA_FOUNDATION_WIDEVINE_CDM = 30;
1074    CROWD_DENY = 31;
1075    APP_PROVISIONING = 32;
1076    AUTOFILL_STATES = 33;
1077    CLIENT_SIDE_PHISHING = 34;
1078    COMMERCE_HEURISTICS = 35;
1079    CROW_DOMAIN_LIST = 36;
1080    DEMO_MODE_APP = 37;
1081    DESKTOP_SCREENSHOT_EDITOR = 38;
1082    DESKTOP_SHARING_HUB = 39;
1083    FIRST_PARTY_SETS = 40;
1084    HYPHENATION = 41;
1085    INTERVENTION_POLICY_DATABASE = 42;
1086    LACROS_DOGFOOD_BETA = 43;
1087    LACROS_DOGFOOD_CANARY = 44;
1088    LACROS_DOGFOOD_DEV = 45;
1089    LACROS_DOGFOOD_STABLE = 46;
1090    MEI_PRELOAD = 47;
1091    PKI_METADATA = 48;
1092    REAL_TIME_URL_CHECKS_ALLOWLIST = 49;
1093    RECOVERY_IMPROVED = 50;
1094    SAFETY_TIPS = 51;
1095    SCREEN_AI = 52;
1096    SMART_DIM = 53;
1097    SODA = 54;
1098    SODA_DE_DE = 55;
1099    SODA_EN_US = 56;
1100    SODA_ES_ES = 57;
1101    SODA_FR_FR = 58;
1102    SODA_IT_IT = 59;
1103    SODA_JA_JP = 60;
1104    THIRD_PARTY_MODULE_LIST = 61;
1105    TRUST_TOKEN_KEY_COMMITMENTS = 62;
1106    THIRD_PARTY_COOKIE_DEPRECATION_METADATA = 63;
1107    GROWTH_CAMPAIGNS = 64;
1108  }
1109
1110  // Information about what Chrome components are registered and at which
1111  // version.
1112  // Next Tag: 5
1113  message ChromeComponent {
1114    // Which component this information is for.
1115    optional ComponentId component_id = 1 [default = UNKNOWN];
1116
1117    // Human-readable dotted-quad representation of the currently-installed
1118    // version of the component, e.g. "1.2.3.4".
1119    optional string version = 2;
1120
1121    // The first 32 bits of the Omaha-style fingerprint of the installed
1122    // component, discarding any bits that describe the fingerprint format. In
1123    // practice this is the first 32 bits of the SHA256 hash of the package that
1124    // was installed as the component. It is a stronger version number that can
1125    // vary across platform, architecture, or branches of an A/B component test.
1126    optional fixed32 omaha_fingerprint = 3;
1127
1128    // A hash of the cohort identifier of this component, excluding
1129    // non-assignment information. The hash function is Chromium's
1130    // PersistentHash.
1131    optional fixed32 cohort_hash = 4;
1132  }
1133  repeated ChromeComponent chrome_component = 24;
1134
1135  // Information about the user's installed extensions. This will include
1136  // extensions from all fully-initialized profiles. If a single extension is
1137  // installed in multiple profiles, it will be recorded multiple times.
1138  repeated ExtensionInstallProto extension_install = 25;
1139
1140  // Android-only.
1141  // For Chrome UMA records, this field contains the package name of the
1142  // version of Chrome that is running if it's different from
1143  // "com.android.chrome".  ("com.android.chrome" is the name of the Chrome
1144  // stable channel app package name.)
1145  // For WebView UMA records, under some conditions this field contains the
1146  // package name of the currently-running app.  See http://shortn/_5HRGU153JL
1147  // for details.
1148  optional string app_package_name = 26;
1149
1150  // Indicates if the `app_package_name` should be filtered out on the
1151  // server-side. The client will use this to signal no further filtering is
1152  // required if filtering is enabled on the client-side. If the package name is
1153  // a system app and the server-side filtering is enabled, the client will use
1154  // this to indicate no filtering is required since system apps are not subject
1155  // to filtering. Only recorded on the Android WebView platform.
1156  enum AppPackageNameAllowlistFilter {
1157    // Indicates the package name filtering was not set.
1158    // This will be the case with data coming from old WebView versions.
1159    SERVER_SIDE_FILTER_UNSPECIFIED = 0;
1160    // Indicates the package name filtering should occur on the server-side
1161    SERVER_SIDE_FILTER_REQUIRED = 1;
1162    // Indicates the `app_package_name` does not need filtering since it is
1163    // a system app.
1164    NO_SERVER_SIDE_FILTER_REQUIRED_FOR_SYSTEM_APPS = 3;
1165
1166    // Removed in cl/567086405:
1167    reserved 2;
1168    reserved "NO_SERVER_SIDE_FILTER_REQUIRED_DUE_TO_CLIENT_FILTERING";
1169  }
1170
1171  optional AppPackageNameAllowlistFilter app_package_name_allowlist_filter = 42;
1172
1173  enum ClientSideSamplingStatus {
1174    // Default value, no conclusion can be drawn.
1175    SAMPLING_UNKNOWN = 0;
1176    // Client-side sampling was applied.
1177    SAMPLING_APPLIED = 1;
1178    // Client-side sampling was not applied.
1179    SAMPLING_NOT_APPLIED = 2;
1180  }
1181
1182  // Specifies whether sampling was applied on the client. Older clients will
1183  // not set this field, which will result in the default value of UNKNOWN.
1184  optional ClientSideSamplingStatus client_side_sampling_status = 43;
1185
1186  enum MetricsFilteringStatus {
1187    // Not expected to be reported explicitly, used when the field was not set.
1188    METRICS_UNKNOWN = 0;
1189    // Client is reporting all recorded histograms and user actions.
1190    METRICS_ALL = 1;
1191    // Client is reporting only a chosen set of histogrms and user actions.
1192    // The semantics of METRICS_ONLY_CRITICAL may vary by platform and evolve
1193    // over time.
1194    METRICS_ONLY_CRITICAL = 2;
1195  }
1196
1197  // Specifies whether metrics filtering was applied on the client. Metrics
1198  // filtering applies to both histograms and user actions. The chosen metrics
1199  // to filter may vary by platform and evolve over time. Older clients will not
1200  // set this field, which will result in the default value of METRICS_UNKNOWN.
1201  optional MetricsFilteringStatus metrics_filtering_status = 44;
1202
1203  // The package which installed Chrome, as reported by
1204  // PackageManager.getInstallerPackageName().
1205  enum InstallerPackage {
1206    // This field was not set.
1207    INSTALLER_PACKAGE_UNKNOWN = 0;
1208    // The installer package name returned by Android was empty.
1209    INSTALLER_PACKAGE_NONE = 1;
1210    // 'com.android.vending'.
1211    INSTALLER_PACKAGE_GOOGLE_PLAY_STORE = 2;
1212    // Any other non-empty value.
1213    INSTALLER_PACKAGE_OTHER = 3;
1214  }
1215
1216  // The package which installed Chrome, as reported by Android.
1217  optional InstallerPackage installer_package = 35;
1218
1219  // Data related to the "Better Together" multi-device features. This is only
1220  // uploaded on Chrome OS.
1221  // Next Tag: 5
1222  message LinkedAndroidPhoneData {
1223    // The pii-free model name of the phone used for Better Together with this
1224    // device. Will not be set if Better Together is not set up. Hashed using
1225    // variations::HashName() to produce a 32-bit SHA1 hash.
1226    optional fixed32 phone_model_name_hash = 1;
1227
1228    // True if SmartLock is enabled on this Chromebook.
1229    optional bool is_smartlock_enabled = 2;
1230
1231    // True if Instant Tethering is enabled on this Chromebook.
1232    optional bool is_instant_tethering_enabled = 3;
1233
1234    // True if Messages integration is enabled on this Chromebook.
1235    // Deprecated 10/23.
1236    optional bool is_messages_enabled = 4 [deprecated = true];
1237  }
1238  optional LinkedAndroidPhoneData linked_android_phone_data = 29;
1239
1240  // Demo mode related dimension information.
1241  // Next Tag: 6
1242  message DemoModeDimensions {
1243    optional string country = 1;
1244
1245    // Demo devices retailer id and store id, value is set during demo setup.
1246    // Next Tag: 3
1247    message Retailer {
1248      optional string retailer_id = 1;
1249      optional string store_id = 2;
1250    }
1251    optional Retailer retailer = 2;
1252
1253    enum CustomizationFacet {
1254      UNDEFINED = 0;
1255      CLOUD_GAMING_DEVICE = 1;
1256      FEATURE_AWARE_DEVICE = 2;
1257    }
1258    repeated CustomizationFacet customization_facet = 3 [packed = true];
1259
1260    // The Demo Mode highlights app version. The version number is used to
1261    // identify the Omaha Chrome Component - Demo Mode App package that was
1262    // downloaded onto the device.
1263    optional string app_version = 4;
1264
1265    // The Demo Mode resources version. The version number is used to identify
1266    // the Omaha Chrome Component - Demo Mode Resources bundle that was
1267    // downloaded onto the device.
1268    optional string resources_version = 5;
1269  }
1270  optional DemoModeDimensions demo_mode_dimensions = 41;
1271
1272  // LTSChannel indicates whether ChromeOS is running an lts channel.
1273  // https://chromium.googlesource.com/chromiumos/docs/+/HEAD/releases.md#channels
1274  enum LTSChannel {
1275    // This field was not set.
1276    LTS_CHANNEL_UNKNOWN = 0;
1277    // ChromeOS is running stable-channel and not lts.
1278    LTS_CHANNEL_STABLE = 1;
1279    // ChromeOS is running ltc-channel.
1280    LTS_CHANNEL_LTC = 2;
1281    // ChromeOS is running lts-channel.
1282    LTS_CHANNEL_LTS = 3;
1283  }
1284
1285  // Report whether ChromeOS is running ltc or lts channel.
1286  // Instead of extending the Channel enum, we report stable-channel and use
1287  // this separate field to filter out for ltc or lts. Most UMA users are not
1288  // aware of the existence of lts and we would lose monitoring for many Chrome
1289  // features.
1290  optional LTSChannel lts_channel = 45;
1291}
1292