Convert DataTypeDebugInfoEmitter into util function
Please see crbug.com/1137896#c1 for context. This CL introduces a new util function which achieves the same UMA-recording functionality of DataTypeDebugInfoEmitter. All users of the DataTypeDebugInfoEmitter API are migrated to the new function. In particular, for CommitContributionImpl this means the histogram will be recorded earlier: it used to be recorded after the server responded (in CleanUp), whereas now it's recorded before sending the commit request (in AddToCommitMessage). This is an acceptable solution because the commit is not aborted between these two events (Init can't return nullptr after this [1]). It may still slightly influence the metrics around shutdown, since the engine is synchronous and some steps are slow. Removing the class itself together with some clean up is left to crrev.com/c/2470528. [1] https://source.chromium.org/chromium/chromium/src/+/a450ab794839b63f9c2ba982f738945f90e9fee2:components/sync/engine_impl/commit.cc;l=135 Bug: 1137896 Change-Id: I9f3ba96d4aad9a434e9b326458de8c392d4946b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2470877 Commit-Queue: Victor Vianna <victorvianna@google.com> Reviewed-by:Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#817103}
Showing
Please register or sign in to comment