the Chromium logo

The Chromium Projects

Deprecating Features

How To Measure Usage and Notify Developers

  1. Add your feature to web_feature.mojom's WebFeature.
  2. Add a clever deprecation message to the big switch in [UseCounter::deprecationMessage](
  3. Instrument your code by:
    • Adding [DeprecateAs]([your enum value here] to the feature's IDL definition (see these examples).
    • Adding a call to [Deprecation::CountDeprecation]( somewhere relevant (as we're dong for the UserMediaRequest.

Note that DeprecateAs is intended to replace MeasureAs in the IDL file. Specifying both is redundant.