[privacy_budget] IdentifiableTokens are not digests.
The identifiability metrics reporting APIs should be able to consume digestible parameters directly without passing it through a non-typesafe conversion. In addition, the generated "digests" aren't really digests in the sense that the output depends quite directly on partitioning of the input, something that shouldn't affect digests. In order to account for these, this CL introduces a concept of a IdentifiabilityToken which can automatically consume supported data types. It is a 'sample encoding' rather than a digest and cannot be used as an input for the purpose of constructing stateful digests, because by design it is not a digest. From the perspective of a call site, these changes mean that the invocation for recording a metric will go from this: IdentifiabilityMetricBuilder( base::UkmSourceId::FromInt64(document->UkmSourceID())) .Set(IdentifiableSurface::FromTypeAndInput( IdentifiableSurface::Type::kWebFeature, static_cast<uint64_t>(feature)), IdentifiabilityDigestHelper(value)) .Record(document->UkmRecorder()); To: IdentifiabilityMetricBuilder(document->UkmSourceID()) .SetWebFeature(feature, value) .Record(document->UkmRecorder()); Bug: 973801 Change-Id: I326bc5a4ead5efbb3a04bf8314692a151fa082f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207291 Commit-Queue: Asanka Herath <asanka@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Caleb Raitto <caraitto@chromium.org> Cr-Commit-Position: refs/heads/master@{#775313}
Showing
Please register or sign in to comment