[Structured metrics] Add support for projects in core hashing logic.
This CL takes the XML configuration for projects, and uses it to change hashing behaviour for events. The main changes are as follows. - Some minor renaming in the codegen: key_name_hash is now key_name. I realized having "hash" in the name was ambiguous: it could refer to either the hash of the key's name (correct) or the name hash of the key (dangerous!) - The kEventNameHashes list has been renamed kKeyNames, and now includes all and only name hashes referring to keys used for hashing. - KeyData now no longer works with 'events', it works with 'key_names', which refer to either an event or project name hash. - StructuredMetricsProvider now looks up an event's key_name, rather than event_name_hash, and uses that for hashing. - SMP also now computes the user event ID on OnRecord and saves it with the hashed data, rather than on ProvideCurrentSessionData. I don't know why this wasn't already the case! This CL minimally modifies the existing unit tests, and a follow-up will add extra tests covering more edge cases of projects. Bug: 1016655 Change-Id: I83c5add6c281b48201ebdb94f60aaaad88ce39b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2115859Reviewed-by:Charles . <charleszhao@chromium.org> Commit-Queue: Tony Yeoman <tby@chromium.org> Cr-Commit-Position: refs/heads/master@{#754371}
Showing
Please register or sign in to comment