Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / components / metrics / proto / system_profile.proto
1 // Copyright 2014 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 // Stores information about the user's brower and system configuration.
6 // The system configuration fields are recorded once per client session.
7
8 syntax = "proto2";
9
10 option optimize_for = LITE_RUNTIME;
11
12 package metrics;
13
14 // Next tag: 20
15 message SystemProfileProto {
16   // The time when the client was compiled/linked, in seconds since the epoch.
17   optional int64 build_timestamp = 1;
18
19   // A version number string for the application.
20   // Most commonly this is the browser version number found in a user agent
21   // string, and is typically a 4-tuple of numbers separated by periods.  In
22   // cases where the user agent version might be ambiguous (example: Linux 64-
23   // bit build, rather than 32-bit build, or a Windows version used in some
24   // special context, such as ChromeFrame running in IE), then this may include
25   // some additional postfix to provide clarification not available in the UA
26   // string.
27   //
28   // An example of a browser version 4-tuple is "5.0.322.0".  Currently used
29   // postfixes are:
30   //
31   //   "-64": a 64-bit build
32   //   "-F": Chrome is running under control of ChromeFrame
33   //   "-devel": this is not an official build of Chrome
34   //
35   // A full version number string could look similar to:
36   // "5.0.322.0-F-devel".
37   //
38   // This value, when available, is more trustworthy than the UA string
39   // associated with the request; and including the postfix, may be more
40   // specific.
41   optional string app_version = 2;
42
43   // The brand code or distribution tag assigned to a partner, if available.
44   // Brand codes are only available on Windows.  Not every Windows install
45   // though will have a brand code.
46   optional string brand_code = 12;
47
48   // The possible channels for an installation, from least to most stable.
49   enum Channel {
50     CHANNEL_UNKNOWN = 0;  // Unknown channel -- perhaps an unofficial build?
51     CHANNEL_CANARY = 1;
52     CHANNEL_DEV = 2;
53     CHANNEL_BETA = 3;
54     CHANNEL_STABLE = 4;
55   }
56   optional Channel channel = 10;
57
58   // The date the user enabled UMA, in seconds since the epoch.
59   // If the user has toggled the UMA enabled state multiple times, this will
60   // be the most recent date on which UMA was enabled.
61   // For privacy, this is rounded to the nearest hour.
62   optional int64 uma_enabled_date = 3;
63
64   // The time when the client was installed, in seconds since the epoch.
65   // For privacy, this is rounded to the nearest hour.
66   optional int64 install_date = 16;
67
68   // The user's selected application locale, i.e. the user interface language.
69   // The locale includes a language code and, possibly, also a country code,
70   // e.g. "en-US".
71   optional string application_locale = 4;
72
73   // Information on the user's operating system.
74   message OS {
75     // The user's operating system.
76     optional string name = 1;
77
78     // The version of the OS.  The meaning of this field is OS-dependent.
79     optional string version = 2;
80
81     // The fingerprint of the build.  This field is used only on Android.
82     optional string fingerprint = 3;
83   }
84   optional OS os = 5;
85
86   // Next tag for Hardware: 16
87   // Information on the user's hardware.
88   message Hardware {
89     // The CPU architecture (x86, PowerPC, x86_64, ...)
90     optional string cpu_architecture = 1;
91
92     // The amount of RAM present on the system, in megabytes.
93     optional int64 system_ram_mb = 2;
94
95     // The base memory address that chrome.dll was loaded at.
96     // (Logged only on Windows.)
97     optional int64 dll_base = 3;
98
99     // The Chrome OS device hardware class ID is a unique string associated with
100     // each Chrome OS device product revision generally assigned at hardware
101     // qualification time.  The hardware class effectively identifies the
102     // configured system components such as CPU, WiFi adapter, etc.
103     //
104     // An example of such a hardware class is "IEC MARIO PONY 6101".  An
105     // internal database associates this hardware class with the qualified
106     // device specifications including OEM information, schematics, hardware
107     // qualification reports, test device tags, etc.
108     optional string hardware_class = 4;
109
110     // The number of physical screens.
111     optional int32 screen_count = 5;
112
113     // The screen dimensions of the primary screen, in pixels.
114     optional int32 primary_screen_width = 6;
115     optional int32 primary_screen_height = 7;
116
117     // The device scale factor of the primary screen.
118     optional float primary_screen_scale_factor = 12;
119
120     // Max DPI for any attached screen. (Windows only)
121     optional float max_dpi_x = 9;
122     optional float max_dpi_y = 10;
123
124     // Information on the CPU obtained by CPUID.
125     message CPU {
126       // A 12 character string naming the vendor, e.g. "GeniuneIntel".
127       optional string vendor_name = 1;
128
129       // The signature reported by CPUID (from EAX).
130       optional uint32 signature = 2;
131     }
132     optional CPU cpu = 13;
133
134     // Information on the GPU
135     message Graphics {
136       // The GPU manufacturer's vendor id.
137       optional uint32 vendor_id = 1;
138
139       // The GPU manufacturer's device id for the chip set.
140       optional uint32 device_id = 2;
141
142       // The driver version on the GPU.
143       optional string driver_version = 3;
144
145       // The driver date on the GPU.
146       optional string driver_date = 4;
147
148       // The GPU performance statistics.
149       // See http://src.chromium.org/viewvc/chrome/trunk/src/content/public/common/gpu_performance_stats.h?view=markup
150       // for details.  Currently logged only on Windows.
151       message PerformanceStatistics {
152         optional float graphics_score = 1;
153         optional float gaming_score = 2;
154         optional float overall_score = 3;
155       }
156       optional PerformanceStatistics performance_statistics = 5;
157
158       // The GL_VENDOR string. An example of a gl_vendor string is
159       // "Imagination Technologies". "" if we are not using OpenGL.
160       optional string gl_vendor = 6;
161
162       // The GL_RENDERER string. An example of a gl_renderer string is
163       // "PowerVR SGX 540". "" if we are not using OpenGL.
164       optional string gl_renderer = 7;
165     }
166     optional Graphics gpu = 8;
167
168     // Information about Bluetooth devices paired with the system.
169     message Bluetooth {
170       // Whether Bluetooth is present on this system.
171       optional bool is_present = 1;
172
173       // Whether Bluetooth is enabled on this system.
174       optional bool is_enabled = 2;
175
176       // Describes a paired device.
177       message PairedDevice {
178         // Assigned class of the device. This is a bitfield according to the
179         // Bluetooth specification available at the following URL:
180         // https://www.bluetooth.org/en-us/specification/assigned-numbers-overview/baseband
181         optional uint32 bluetooth_class = 1;
182
183         // Decoded device type.
184         enum Type {
185           DEVICE_UNKNOWN = 0;
186           DEVICE_COMPUTER = 1;
187           DEVICE_PHONE = 2;
188           DEVICE_MODEM = 3;
189           DEVICE_AUDIO = 4;
190           DEVICE_CAR_AUDIO = 5;
191           DEVICE_VIDEO = 6;
192           DEVICE_PERIPHERAL = 7;
193           DEVICE_JOYSTICK = 8;
194           DEVICE_GAMEPAD = 9;
195           DEVICE_KEYBOARD = 10;
196           DEVICE_MOUSE = 11;
197           DEVICE_TABLET = 12;
198           DEVICE_KEYBOARD_MOUSE_COMBO = 13;
199         }
200         optional Type type = 2;
201
202         // Vendor prefix of the Bluetooth address, these are OUI registered by
203         // the IEEE and are encoded with the first byte in bits 16-23, the
204         // second byte in bits 8-15 and the third byte in bits 0-7.
205         //
206         // ie. Google's OUI (00:1A:11) is encoded as 0x00001A11
207         optional uint32 vendor_prefix = 4;
208
209         // The Vendor ID of a device, returned in vendor_id below, can be
210         // either allocated by the Bluetooth SIG or USB IF, providing two
211         // completely overlapping namespaces for identifiers.
212         //
213         // This field should be read along with vendor_id to correctly
214         // identify the vendor. For example Google is identified by either
215         // vendor_id_source = VENDOR_ID_BLUETOOTH, vendor_id = 0x00E0 or
216         // vendor_id_source = VENDOR_ID_USB, vendor_id = 0x18D1.
217         //
218         // If the device does not support the Device ID specification the
219         // unknown value will be set.
220         enum VendorIDSource {
221           VENDOR_ID_UNKNOWN = 0;
222           VENDOR_ID_BLUETOOTH = 1;
223           VENDOR_ID_USB = 2;
224         }
225         optional VendorIDSource vendor_id_source = 8;
226
227         // Vendor ID of the device, where available.
228         optional uint32 vendor_id = 5;
229
230         // Product ID of the device, where available.
231         optional uint32 product_id = 6;
232
233         // Device ID of the device, generally the release or version number in
234         // BCD format, where available.
235         optional uint32 device_id = 7;
236       }
237       repeated PairedDevice paired_device = 3;
238     }
239     optional Bluetooth bluetooth = 11;
240
241     // Whether the internal display produces touch events. Omitted if unknown.
242     // Logged on ChromeOS only.
243     optional bool internal_display_supports_touch = 14;
244
245     // Vendor ids and product ids of external touchscreens.
246     message TouchScreen {
247       // Touch screen vendor id.
248       optional uint32 vendor_id = 1;
249       // Touch screen product id.
250       optional uint32 product_id = 2;
251     }
252     // Lists vendor and product ids of external touchscreens.
253     // Logged on ChromeOS only.
254     repeated TouchScreen external_touchscreen = 15;
255   }
256   optional Hardware hardware = 6;
257
258   // Information about the network connection.
259   message Network {
260     // Set to true if connection_type changed during the lifetime of the log.
261     optional bool connection_type_is_ambiguous = 1;
262
263     // See net::NetworkChangeNotifier::ConnectionType.
264     enum ConnectionType {
265       CONNECTION_UNKNOWN = 0;
266       CONNECTION_ETHERNET = 1;
267       CONNECTION_WIFI = 2;
268       CONNECTION_2G = 3;
269       CONNECTION_3G = 4;
270       CONNECTION_4G = 5;
271       CONNECTION_BLUETOOTH = 6;
272     }
273     // The connection type according to NetworkChangeNotifier.
274     optional ConnectionType connection_type = 2;
275
276     // Set to true if wifi_phy_layer_protocol changed during the lifetime of the log.
277     optional bool wifi_phy_layer_protocol_is_ambiguous = 3;
278
279     // See net::WifiPHYLayerProtocol.
280     enum WifiPHYLayerProtocol {
281       WIFI_PHY_LAYER_PROTOCOL_NONE = 0;
282       WIFI_PHY_LAYER_PROTOCOL_ANCIENT = 1;
283       WIFI_PHY_LAYER_PROTOCOL_A = 2;
284       WIFI_PHY_LAYER_PROTOCOL_B = 3;
285       WIFI_PHY_LAYER_PROTOCOL_G = 4;
286       WIFI_PHY_LAYER_PROTOCOL_N = 5;
287       WIFI_PHY_LAYER_PROTOCOL_UNKNOWN = 6;
288     }
289     // The physical layer mode of the associated wifi access point, if any.
290     optional WifiPHYLayerProtocol wifi_phy_layer_protocol = 4;
291   }
292   optional Network network = 13;
293
294   // Information on the Google Update install that is managing this client.
295   message GoogleUpdate {
296     // Whether the Google Update install is system-level or user-level.
297     optional bool is_system_install = 1;
298
299     // The date at which Google Update last started performing an automatic
300     // update check, in seconds since the Unix epoch.
301     optional int64 last_automatic_start_timestamp = 2;
302
303     // The date at which Google Update last successfully sent an update check
304     // and recieved an intact response from the server, in seconds since the
305     // Unix epoch. (The updates don't need to be successfully installed.)
306     optional int64 last_update_check_timestamp = 3;
307
308     // Describes a product being managed by Google Update. (This can also
309     // describe Google Update itself.)
310     message ProductInfo {
311       // The current version of the product that is installed.
312       optional string version = 1;
313
314       // The date at which Google Update successfully updated this product,
315       // stored in seconds since the Unix epoch.  This is updated when an update
316       // is successfully applied, or if the server reports that no update
317       // is available.
318       optional int64 last_update_success_timestamp = 2;
319
320       // The result reported by the product updater on its last run.
321       enum InstallResult {
322         INSTALL_RESULT_SUCCESS = 0;
323         INSTALL_RESULT_FAILED_CUSTOM_ERROR = 1;
324         INSTALL_RESULT_FAILED_MSI_ERROR = 2;
325         INSTALL_RESULT_FAILED_SYSTEM_ERROR = 3;
326         INSTALL_RESULT_EXIT_CODE = 4;
327       }
328       optional InstallResult last_result = 3;
329
330       // The error code reported by the product updater on its last run.  This
331       // will typically be a error code specific to the product installer.
332       optional int32 last_error = 4;
333
334       // The extra error code reported by the product updater on its last run.
335       // This will typically be a Win32 error code.
336       optional int32 last_extra_error = 5;
337     }
338     optional ProductInfo google_update_status = 4;
339     optional ProductInfo client_status = 5;
340   }
341   optional GoogleUpdate google_update = 11;
342
343   // Information on all installed plugins.
344   message Plugin {
345     // The plugin's self-reported name and filename (without path).
346     optional string name = 1;
347     optional string filename = 2;
348
349     // The plugin's version.
350     optional string version = 3;
351
352     // True if the plugin is disabled.
353     // If a client has multiple local Chrome user accounts, this is logged based
354     // on the first user account launched during the current session.
355     optional bool is_disabled = 4;
356
357     // True if the plugin is PPAPI.
358     optional bool is_pepper = 5;
359   }
360   repeated Plugin plugin = 7;
361
362   // Figures that can be used to generate application stability metrics.
363   // All values are counts of events since the last time that these
364   // values were reported.
365   // Next tag: 24
366   message Stability {
367     // Total amount of time that the program was running, in seconds,
368     // since the last time a log was recorded, as measured using a client-side
369     // clock implemented via TimeTicks, which guarantees that it is monotonic
370     // and does not jump if the user changes his/her clock.  The TimeTicks
371     // implementation also makes the clock not count time the computer is
372     // suspended.
373     optional int64 incremental_uptime_sec = 1;
374
375     // Total amount of time that the program was running, in seconds,
376     // since startup, as measured using a client-side clock implemented
377     // via TimeTicks, which guarantees that it is monotonic and does not
378     // jump if the user changes his/her clock.  The TimeTicks implementation
379     // also makes the clock not count time the computer is suspended.
380     // This field was added for M-35.
381     optional int64 uptime_sec = 23;
382
383     // Page loads along with renderer crashes and hangs, since page load count
384     // roughly corresponds to usage.
385     optional int32 page_load_count = 2;
386     optional int32 renderer_crash_count = 3;
387     optional int32 renderer_hang_count = 4;
388
389     // Number of renderer crashes that were for extensions.
390     // TODO(isherman): Figure out whether this is also counted in
391     // |renderer_crash_count|.
392     optional int32 extension_renderer_crash_count = 5;
393
394     // Number of non-renderer child process crashes.
395     optional int32 child_process_crash_count = 6;
396
397     // Number of times the browser has crashed while logged in as the "other
398     // user" (guest) account.
399     // Logged on ChromeOS only.
400     optional int32 other_user_crash_count = 7;
401
402     // Number of times the kernel has crashed.
403     // Logged on ChromeOS only.
404     optional int32 kernel_crash_count = 8;
405
406     // Number of times the system has shut down uncleanly.
407     // Logged on ChromeOS only.
408     optional int32 unclean_system_shutdown_count = 9;
409
410     //
411     // All the remaining fields in the Stability are recorded at most once per
412     // client session.
413     //
414
415     // The number of times the program was launched.
416     // This will typically be equal to 1.  However, it is possible that Chrome
417     // was unable to upload stability metrics for previous launches (e.g. due to
418     // crashing early during startup), and hence this value might be greater
419     // than 1.
420     optional int32 launch_count = 15;
421     // The number of times that it didn't exit cleanly (which we assume to be
422     // mostly crashes).
423     optional int32 crash_count = 16;
424
425     // The number of times the program began, but did not complete, the shutdown
426     // process.  (For example, this may occur when Windows is shutting down, and
427     // it only gives the process a few seconds to clean up.)
428     optional int32 incomplete_shutdown_count = 17;
429
430     // The number of times the program was able register with breakpad crash
431     // services.
432     optional int32 breakpad_registration_success_count = 18;
433
434     // The number of times the program failed to register with breakpad crash
435     // services.  If crash registration fails then when the program crashes no
436     // crash report will be generated.
437     optional int32 breakpad_registration_failure_count = 19;
438
439     // The number of times the program has run under a debugger.  This should
440     // be an exceptional condition.  Running under a debugger prevents crash
441     // dumps from being generated.
442     optional int32 debugger_present_count = 20;
443
444     // The number of times the program has run without a debugger attached.
445     // This should be most common scenario and should be very close to
446     // |launch_count|.
447     optional int32 debugger_not_present_count = 21;
448
449     // Stability information for all installed plugins.
450     message PluginStability {
451       // The relevant plugin's information (name, etc.)
452       optional Plugin plugin = 1;
453
454       // The number of times this plugin's process was launched.
455       optional int32 launch_count = 2;
456
457       // The number of times this plugin was instantiated on a web page.
458       // This will be >= |launch_count|.
459       // (A page load with multiple sections drawn by this plugin will
460       // increase this count multiple times.)
461       optional int32 instance_count = 3;
462
463       // The number of times this plugin process crashed.
464       // This value will be <= |launch_count|.
465       optional int32 crash_count = 4;
466
467       // The number of times this plugin could not be loaded.
468       optional int32 loading_error_count = 5;
469     }
470     repeated PluginStability plugin_stability = 22;
471   }
472   optional Stability stability = 8;
473
474   // Description of a field trial or experiment that the user is currently
475   // enrolled in.
476   // All metrics reported in this upload can potentially be influenced by the
477   // field trial.
478   message FieldTrial {
479     // The name of the field trial, as a 32-bit identifier.
480     // Currently, the identifier is a hash of the field trial's name.
481     optional fixed32 name_id = 1;
482
483     // The user's group within the field trial, as a 32-bit identifier.
484     // Currently, the identifier is a hash of the group's name.
485     optional fixed32 group_id = 2;
486   }
487   repeated FieldTrial field_trial = 9;
488
489   // Information about the A/V output device(s) (typically just a TV).
490   // However, a configuration may have one or more intermediate A/V devices
491   // between the source device and the TV (e.g. an A/V receiver, video
492   // processor, etc.).
493   message ExternalAudioVideoDevice {
494     // The manufacturer name (possibly encoded as a 3-letter code, e.g. "YMH"
495     // for Yamaha).
496     optional string manufacturer_name = 1;
497
498     // The model name (e.g. "RX-V1900"). Some devices may report generic names
499     // like "receiver" or use the full manufacturer name (e.g "PHILIPS").
500     optional string model_name = 2;
501
502     // The product code (e.g. "0218").
503     optional string product_code = 3;
504
505     // The device types. A single device can have multiple types (e.g. a set-top
506     // box could be both a tuner and a player).  The same type may even be
507     // repeated (e.g a device that reports two tuners).
508     enum AVDeviceType {
509       AV_DEVICE_TYPE_UNKNOWN = 0;
510       AV_DEVICE_TYPE_TV = 1;
511       AV_DEVICE_TYPE_RECORDER = 2;
512       AV_DEVICE_TYPE_TUNER = 3;
513       AV_DEVICE_TYPE_PLAYER = 4;
514       AV_DEVICE_TYPE_AUDIO_SYSTEM = 5;
515     }
516     repeated AVDeviceType av_device_type = 4;
517
518     // The year of manufacture.
519     optional int32 manufacture_year = 5;
520
521     // The week of manufacture.
522     // Note: per the Wikipedia EDID article, numbering for this field may not
523     // be consistent between manufacturers.
524     optional int32 manufacture_week = 6;
525
526     // Max horizontal resolution in pixels.
527     optional int32 horizontal_resolution = 7;
528
529     // Max vertical resolution in pixels.
530     optional int32 vertical_resolution = 8;
531
532     // Audio capabilities of the device.
533     // Ref: http://en.wikipedia.org/wiki/Extended_display_identification_data
534     message AudioDescription {
535       // Audio format
536       enum AudioFormat {
537         AUDIO_FORMAT_UNKNOWN = 0;
538         AUDIO_FORMAT_LPCM = 1;
539         AUDIO_FORMAT_AC_3 = 2;
540         AUDIO_FORMAT_MPEG1 = 3;
541         AUDIO_FORMAT_MP3 = 4;
542         AUDIO_FORMAT_MPEG2 = 5;
543         AUDIO_FORMAT_AAC = 6;
544         AUDIO_FORMAT_DTS = 7;
545         AUDIO_FORMAT_ATRAC = 8;
546         AUDIO_FORMAT_ONE_BIT = 9;
547         AUDIO_FORMAT_DD_PLUS = 10;
548         AUDIO_FORMAT_DTS_HD = 11;
549         AUDIO_FORMAT_MLP_DOLBY_TRUEHD = 12;
550         AUDIO_FORMAT_DST_AUDIO = 13;
551         AUDIO_FORMAT_MICROSOFT_WMA_PRO = 14;
552       }
553       optional AudioFormat audio_format = 1;
554
555       // Number of channels (e.g. 1, 2, 8, etc.).
556       optional int32 num_channels = 2;
557
558       // Supported sample frequencies in Hz (e.g. 32000, 44100, etc.).
559       // Multiple frequencies may be specified.
560       repeated int32 sample_frequency_hz = 3;
561
562       // Maximum bit rate in bits/s.
563       optional int32 max_bit_rate_per_second = 4;
564
565       // Bit depth (e.g. 16, 20, 24, etc.).
566       optional int32 bit_depth = 5;
567     }
568     repeated AudioDescription audio_description = 9;
569
570     // The position in AV setup.
571     // A value of 0 means this device is the TV.
572     // A value of 1 means this device is directly connected to one of
573     // the TV's inputs.
574     // Values > 1 indicate there are 1 or more devices between this device
575     // and the TV.
576     optional int32 position_in_setup = 10;
577
578     // Whether this device is in the path to the TV.
579     optional bool is_in_path_to_tv = 11;
580
581     // The CEC version the device supports.
582     // CEC stands for Consumer Electronics Control, a part of the HDMI
583     // specification.  Not all HDMI devices support CEC.
584     // Only devices that support CEC will report a value here.
585     optional int32 cec_version = 12;
586
587     // This message reports CEC commands seen by a device.
588     // After each log is sent, this information is cleared and gathered again.
589     // By collecting CEC status information by opcode we can determine
590     // which CEC features can be supported.
591     message CECCommand {
592       // The CEC command opcode.  CEC supports up to 256 opcodes.
593       // We add only one CECCommand message per unique opcode.  Only opcodes
594       // seen by the device will be reported. The remainder of the message
595       // accumulates status for this opcode (and device).
596       optional int32 opcode = 1;
597
598       // The total number of commands received from the external device.
599       optional int32 num_received_direct = 2;
600
601       // The number of commands received from the external device as part of a
602       // broadcast message.
603       optional int32 num_received_broadcast = 3;
604
605       // The total number of commands sent to the external device.
606       optional int32 num_sent_direct = 4;
607
608       // The number of commands sent to the external device as part of a
609       // broadcast message.
610       optional int32 num_sent_broadcast = 5;
611
612       // The number of aborted commands for unknown reasons.
613       optional int32 num_aborted_unknown_reason = 6;
614
615       // The number of aborted commands because of an unrecognized opcode.
616       optional int32 num_aborted_unrecognized = 7;
617     }
618     repeated CECCommand cec_command = 13;
619   }
620   repeated ExternalAudioVideoDevice external_audio_video_device = 14;
621
622   // Information about the current wireless access point. Collected directly
623   // from the wireless access point via standard apis if the device is
624   // connected to the Internet wirelessly. Introduced for Chrome on TV devices
625   // but also can be collected by ChromeOS, Android or other clients.
626   message ExternalAccessPoint {
627     // The manufacturer name, for example "ASUSTeK Computer Inc.".
628     optional string manufacturer = 1;
629
630     // The model name, for example "Wi-Fi Protected Setup Router".
631     optional string model_name = 2;
632
633     // The model number, for example "RT-N16".
634     optional string model_number = 3;
635
636     // The device name (sometime same as model_number), for example "RT-N16".
637     optional string device_name = 4;
638   }
639   optional ExternalAccessPoint external_access_point = 15;
640
641   // Number of users currently signed into a multiprofile session.
642   // A zero value indicates that the user count changed while the log is open.
643   // Logged only on ChromeOS.
644   optional uint32 multi_profile_user_count = 17;
645
646   // Information about extensions that are installed, masked to provide better
647   // privacy.  Only extensions from a single profile are reported; this will
648   // generally be the profile used when the browser is started.  The profile
649   // reported on will remain consistent at least until the browser is
650   // relaunched (or the profile is deleted by the user).
651   //
652   // Each client first picks a value for client_key derived from its UMA
653   // client_id:
654   //   client_key = client_id % 4096
655   // Then, each installed extension is mapped into a hash bucket according to
656   //   bucket = CityHash64(StringPrintf("%d:%s",
657   //                                    client_key, extension_id)) % 1024
658   // The client reports the set of hash buckets occupied by all installed
659   // extensions.  If multiple extensions map to the same bucket, that bucket is
660   // still only reported once.
661   repeated int32 occupied_extension_bucket = 18;
662
663   // The state of loaded extensions for this system. The system can have either
664   // no applicable extensions, extensions only from the webstore and verified by
665   // the webstore, extensions only from the webstore but not verified, or
666   // extensions not from the store. If there is a single off-store extension,
667   // then HAS_OFFSTORE is reported. This should be kept in sync with the
668   // corresponding enum in chrome/browser/metrics/extensions_metrics_provider.cc
669   enum ExtensionsState {
670     NO_EXTENSIONS = 0;
671     NO_OFFSTORE_VERIFIED = 1;
672     NO_OFFSTORE_UNVERIFIED = 2;
673     HAS_OFFSTORE = 3;
674   }
675   optional ExtensionsState offstore_extensions_state = 19;
676 }