tree: 083da79d0ed0bde05e25b83fa5816a5bf91b667e [path history] [tgz]
  1. BUILD.gn
  2. DEPS
  3. media_device_id_salt.cc
  4. media_device_id_salt.h
  5. media_device_salt_database.cc
  6. media_device_salt_database.h
  7. media_device_salt_database_unittest.cc
  8. media_device_salt_service.cc
  9. media_device_salt_service.h
  10. media_device_salt_service_unittest.cc
  11. OWNERS
  12. README.md
components/media_device_salt/README.md

MediaDeviceSalt Component

Some Web and Extension APIs expose media devices (i.e., microphones and cameras) to applications using IDs. The Media Capture and Streams spec says device IDs must be persistent and unique for top-level documents of the same origin. The reason they must be unique per origin is to avoid cross-origin tracking.

To satisfy this requirement, Chromium exposes device IDs generated by hashing the origin, the real device ID and a random persistent salt. This allows the IDs to be unique per origin, mappable back to the real device IDs, and resettable (by replacing the salt).

The service implemented in this directory allows clients to read and reset the salt used to generate Web-exposed media device IDs. Resetting a salt has the effect of invalidating previous persistent device IDs, so it is equivalent to deleting browsing data such as cookies.