[Hashed logging] Make logging calls thread safe.
We want clients to be able to make logging calls from any sequence. The data flow of the framework looks like this: (client) -----> Recorder -----> Metrics Provider <----- UMA | | | sends sends grabs cached logging log info log info calls periodically The UMA backend requests log info on the browser UI sequence, so we must ensure all Recorder -> Metrics Provider calls also happen on the UI sequence for thread safety. This CL adds logic to the Recorder that checks which sequence a client called on. If it is *not* the UI sequence, it re-calls itself on the UI sequence. This changes the picture to: maybe reschedule on UI seq _______ | | | V (client) -----> Recorder -----> Metrics Provider <----- UMA | | | any seq UI seq UI seq Bug: 1016655 Change-Id: I81d5168eef8b0ad138e09e89a28b6efca3c6c0d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902179Reviewed-by:Thanh Nguyen <thanhdng@chromium.org> Commit-Queue: Tony Yeoman <tby@chromium.org> Cr-Commit-Position: refs/heads/master@{#713308}
Showing
Please register or sign in to comment