Commit 35a98eb4 authored by cfredric's avatar cfredric Committed by Commit Bot

Instrument access to HIDDevice and HIDReportItem fields.

This cl causes the bindings generator to automatically collect UKM when
these attributes are accessed. This will be used to analyze how much
entropy leaked by this API can be used for cross-site tracking.

Change-Id: I25fddca92048669e25674070b0f619368270346c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424073Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Chris Fredrickson <cfredric@google.com>
Cr-Commit-Position: refs/heads/master@{#809753}
parent a39c9305
......@@ -2870,29 +2870,29 @@ enum WebFeature {
kIdentifiabilityStudyReserved3540 = 3540,
kV8WheelEvent_DeltaMode_AttributeGetter = 3541,
kIdentifiabilityStudyReserved3542 = 3542,
kIdentifiabilityStudyReserved3543 = 3543,
kIdentifiabilityStudyReserved3544 = 3544,
kIdentifiabilityStudyReserved3545 = 3545,
kV8HIDDevice_ProductId_AttributeGetter = 3543,
kV8HIDDevice_ProductName_AttributeGetter = 3544,
kV8HIDDevice_VendorId_AttributeGetter = 3545,
kIdentifiabilityStudyReserved3546 = 3546,
kIdentifiabilityStudyReserved3547 = 3547,
kIdentifiabilityStudyReserved3548 = 3548,
kIdentifiabilityStudyReserved3549 = 3549,
kIdentifiabilityStudyReserved3550 = 3550,
kIdentifiabilityStudyReserved3551 = 3551,
kIdentifiabilityStudyReserved3552 = 3552,
kIdentifiabilityStudyReserved3553 = 3553,
kIdentifiabilityStudyReserved3554 = 3554,
kIdentifiabilityStudyReserved3555 = 3555,
kIdentifiabilityStudyReserved3556 = 3556,
kIdentifiabilityStudyReserved3557 = 3557,
kIdentifiabilityStudyReserved3558 = 3558,
kIdentifiabilityStudyReserved3559 = 3559,
kIdentifiabilityStudyReserved3560 = 3560,
kIdentifiabilityStudyReserved3561 = 3561,
kIdentifiabilityStudyReserved3562 = 3562,
kIdentifiabilityStudyReserved3563 = 3563,
kIdentifiabilityStudyReserved3564 = 3564,
kIdentifiabilityStudyReserved3565 = 3565,
kV8HIDReportItem_HasNull_AttributeGetter = 3547,
kV8HIDReportItem_IsAbsolute_AttributeGetter = 3548,
kV8HIDReportItem_IsArray_AttributeGetter = 3549,
kV8HIDReportItem_IsRange_AttributeGetter = 3550,
kV8HIDReportItem_LogicalMaximum_AttributeGetter = 3551,
kV8HIDReportItem_LogicalMinimum_AttributeGetter = 3552,
kV8HIDReportItem_PhysicalMaximum_AttributeGetter = 3553,
kV8HIDReportItem_PhysicalMinimum_AttributeGetter = 3554,
kV8HIDReportItem_ReportCount_AttributeGetter = 3555,
kV8HIDReportItem_ReportSize_AttributeGetter = 3556,
kV8HIDReportItem_UnitExponent_AttributeGetter = 3557,
kV8HIDReportItem_UnitFactorCurrentExponent_AttributeGetter = 3558,
kV8HIDReportItem_UnitFactorLengthExponent_AttributeGetter = 3559,
kV8HIDReportItem_UnitFactorLuminousIntensityExponent_AttributeGetter = 3560,
kV8HIDReportItem_UnitFactorMassExponent_AttributeGetter = 3561,
kV8HIDReportItem_UnitFactorTemperatureExponent_AttributeGetter = 3562,
kV8HIDReportItem_UnitFactorTimeExponent_AttributeGetter = 3563,
kV8HIDReportItem_UsageMaximum_AttributeGetter = 3564,
kV8HIDReportItem_UsageMinimum_AttributeGetter = 3565,
kIdentifiabilityStudyReserved3566 = 3566,
kIdentifiabilityStudyReserved3567 = 3567,
kIdentifiabilityStudyReserved3568 = 3568,
......
......@@ -17,11 +17,11 @@
readonly attribute boolean opened;
// The 16-bit vendor and product IDs reported by the device.
readonly attribute unsigned short vendorId;
readonly attribute unsigned short productId;
[HighEntropy=Direct, Measure] readonly attribute unsigned short vendorId;
[HighEntropy=Direct, Measure] readonly attribute unsigned short productId;
// The device name, as reported by the device and shown in the chooser.
readonly attribute DOMString productName;
[HighEntropy=Direct, Measure] readonly attribute DOMString productName;
// An array of the top-level collections within the HID report descriptor,
// in the order they were encountered within the descriptor. The collections
......
......@@ -34,21 +34,21 @@ enum HIDUnitSystem {
] interface HIDReportItem {
// True if the item represents an absolute measurement (e.g. joystick tilt)
// or false if it represents a relative measurement (e.g. mouse movement).
readonly attribute boolean isAbsolute;
[HighEntropy=Direct, Measure] readonly attribute boolean isAbsolute;
// True if the item is an Array or false if it is a Variable. Array items
// are typically used when a device needs to represent a large number of
// button-type inputs, but only a few inputs need to be active at once.
// Variable items require space in the report for each input, but can report
// all inputs simultaneously.
readonly attribute boolean isArray;
[HighEntropy=Direct, Measure] readonly attribute boolean isArray;
// True if the usages for this item are defined by |usageMinimum| and
// |usageMaximum| or false if the usages are defined by |usages|.
readonly attribute boolean isRange;
[HighEntropy=Direct, Measure] readonly attribute boolean isRange;
// True if the item uses an out-of-bounds value when there is no input.
readonly attribute boolean hasNull;
[HighEntropy=Direct, Measure] readonly attribute boolean hasNull;
// An ordered list of 32-bit usage values associated with this item. Unused
// if |isRange| is true. If |reportCount| is two or more, usages are
......@@ -58,19 +58,19 @@ enum HIDUnitSystem {
// The minimum and maximum usage values associated with this item. Unused if
// |isRange| is false. If |reportCount| is two or more, usages are assigned
// starting from |usageMinimum| and increment by one.
readonly attribute unsigned long usageMinimum;
readonly attribute unsigned long usageMaximum;
[HighEntropy=Direct, Measure] readonly attribute unsigned long usageMinimum;
[HighEntropy=Direct, Measure] readonly attribute unsigned long usageMaximum;
// The size of a single field described by this item, in bits.
readonly attribute unsigned short reportSize;
[HighEntropy=Direct, Measure] readonly attribute unsigned short reportSize;
// The number of similar fields described by this item. The total size of
// the item described by this report is |reportSize| * |reportCount| bits.
readonly attribute unsigned short reportCount;
[HighEntropy=Direct, Measure] readonly attribute unsigned short reportCount;
// The base 10 exponent of the units for this report item. For instance, for
// kilograms |unitExponent| would be 3 and for micrograms it would be -6.
readonly attribute byte unitExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitExponent;
// The unit system determines which units are used for length, mass, time,
// temperature, current, and luminous intensity. May be "none" if the values
......@@ -81,23 +81,23 @@ enum HIDUnitSystem {
// unit definition. For instance, for acceleration all factors would have
// an exponent of 0 except |unitFactorLengthExponent| which would be 1 and
// |unitFactorTimeExponent| which would be -2.
readonly attribute byte unitFactorLengthExponent;
readonly attribute byte unitFactorMassExponent;
readonly attribute byte unitFactorTimeExponent;
readonly attribute byte unitFactorTemperatureExponent;
readonly attribute byte unitFactorCurrentExponent;
readonly attribute byte unitFactorLuminousIntensityExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitFactorLengthExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitFactorMassExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitFactorTimeExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitFactorTemperatureExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitFactorCurrentExponent;
[HighEntropy=Direct, Measure] readonly attribute byte unitFactorLuminousIntensityExponent;
// The minimum and maximum values that may be represented by this input. A
// device with |hasNull| may report a value outside this range to indicate
// no input.
readonly attribute long logicalMinimum;
readonly attribute long logicalMaximum;
[HighEntropy=Direct, Measure] readonly attribute long logicalMinimum;
[HighEntropy=Direct, Measure] readonly attribute long logicalMaximum;
// The minimum and maximum values, scaled to the units described by |unit|
// and |unitExponent|.
readonly attribute long physicalMinimum;
readonly attribute long physicalMaximum;
[HighEntropy=Direct, Measure] readonly attribute long physicalMinimum;
[HighEntropy=Direct, Measure] readonly attribute long physicalMaximum;
// The strings associated with this item.
readonly attribute FrozenArray<DOMString> strings;
......
......@@ -29307,29 +29307,35 @@ Called by update_use_counter_feature_enum.py.-->
<int value="3540" label="IdentifiabilityStudyReserved3540"/>
<int value="3541" label="V8WheelEvent_DeltaMode_AttributeGetter"/>
<int value="3542" label="IdentifiabilityStudyReserved3542"/>
<int value="3543" label="IdentifiabilityStudyReserved3543"/>
<int value="3544" label="IdentifiabilityStudyReserved3544"/>
<int value="3545" label="IdentifiabilityStudyReserved3545"/>
<int value="3543" label="V8HIDDevice_ProductId_AttributeGetter"/>
<int value="3544" label="V8HIDDevice_ProductName_AttributeGetter"/>
<int value="3545" label="V8HIDDevice_VendorId_AttributeGetter"/>
<int value="3546" label="IdentifiabilityStudyReserved3546"/>
<int value="3547" label="IdentifiabilityStudyReserved3547"/>
<int value="3548" label="IdentifiabilityStudyReserved3548"/>
<int value="3549" label="IdentifiabilityStudyReserved3549"/>
<int value="3550" label="IdentifiabilityStudyReserved3550"/>
<int value="3551" label="IdentifiabilityStudyReserved3551"/>
<int value="3552" label="IdentifiabilityStudyReserved3552"/>
<int value="3553" label="IdentifiabilityStudyReserved3553"/>
<int value="3554" label="IdentifiabilityStudyReserved3554"/>
<int value="3555" label="IdentifiabilityStudyReserved3555"/>
<int value="3556" label="IdentifiabilityStudyReserved3556"/>
<int value="3557" label="IdentifiabilityStudyReserved3557"/>
<int value="3558" label="IdentifiabilityStudyReserved3558"/>
<int value="3559" label="IdentifiabilityStudyReserved3559"/>
<int value="3560" label="IdentifiabilityStudyReserved3560"/>
<int value="3561" label="IdentifiabilityStudyReserved3561"/>
<int value="3562" label="IdentifiabilityStudyReserved3562"/>
<int value="3563" label="IdentifiabilityStudyReserved3563"/>
<int value="3564" label="IdentifiabilityStudyReserved3564"/>
<int value="3565" label="IdentifiabilityStudyReserved3565"/>
<int value="3547" label="V8HIDReportItem_HasNull_AttributeGetter"/>
<int value="3548" label="V8HIDReportItem_IsAbsolute_AttributeGetter"/>
<int value="3549" label="V8HIDReportItem_IsArray_AttributeGetter"/>
<int value="3550" label="V8HIDReportItem_IsRange_AttributeGetter"/>
<int value="3551" label="V8HIDReportItem_LogicalMaximum_AttributeGetter"/>
<int value="3552" label="V8HIDReportItem_LogicalMinimum_AttributeGetter"/>
<int value="3553" label="V8HIDReportItem_PhysicalMaximum_AttributeGetter"/>
<int value="3554" label="V8HIDReportItem_PhysicalMinimum_AttributeGetter"/>
<int value="3555" label="V8HIDReportItem_ReportCount_AttributeGetter"/>
<int value="3556" label="V8HIDReportItem_ReportSize_AttributeGetter"/>
<int value="3557" label="V8HIDReportItem_UnitExponent_AttributeGetter"/>
<int value="3558"
label="V8HIDReportItem_UnitFactorCurrentExponent_AttributeGetter"/>
<int value="3559"
label="V8HIDReportItem_UnitFactorLengthExponent_AttributeGetter"/>
<int value="3560"
label="V8HIDReportItem_UnitFactorLuminousIntensityExponent_AttributeGetter"/>
<int value="3561"
label="V8HIDReportItem_UnitFactorMassExponent_AttributeGetter"/>
<int value="3562"
label="V8HIDReportItem_UnitFactorTemperatureExponent_AttributeGetter"/>
<int value="3563"
label="V8HIDReportItem_UnitFactorTimeExponent_AttributeGetter"/>
<int value="3564" label="V8HIDReportItem_UsageMaximum_AttributeGetter"/>
<int value="3565" label="V8HIDReportItem_UsageMinimum_AttributeGetter"/>
<int value="3566" label="IdentifiabilityStudyReserved3566"/>
<int value="3567" label="IdentifiabilityStudyReserved3567"/>
<int value="3568" label="IdentifiabilityStudyReserved3568"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment