
As of https://crrev.com/c/5521957, k-anonymity keys have been stored in the interest group database as part of the `interest_groups` table. As a result, anytime an ad is removed from an interest group and then added back in a subsequent join or update, the key's k-anonymity status is lost and needs to be refected from the k-anonymity server. To prevent this extraneous fetch, this change adds a new `cached_k_anonymity_hashes` table that stores the k-anonymity status for keys fetched from the k-anonymity server, and wires this to this `InterestGroupKAnonymityManager` so that keys that were recently fetched can be pulled from the cache instead of from the k-anonymity server. Note, this does not reverse the change made by https://crrev.com/c/5521957, which resulted in a dramatic improvement to interest group load time. The set of k-anonymous keys for each interest group remains on the `interest_groups` table, where it can be efficiently loaded at interest group load time. Change-Id: I57177a473fdda972f8ab1da80c434fdca984d949 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6361984 Commit-Queue: Orr Bernstein <orrb@google.com> Reviewed-by: Russ Hamilton <behamilton@google.com> Reviewed-by: Luc Nguyen <lucnguyen@google.com> Cr-Commit-Position: refs/heads/main@{#1439603}
Tools used during the build or running tests or sometimes just things that people have found useful while working on Chromium.