Avoid emptry tracing callbacks when possible.
The current code can end up calling the flush callback with an empty data string, even though there is more data to be processed. This doesn't match the description in the comments and can confuse the receiving code. This Cl fixes that, and also simplifies the code a bit.
BUG=481764
Review URL: https://codereview.chromium.org/1131543003
Cr-Commit-Position: refs/heads/master@{#334421}
CrOS-Libchrome-Original-Commit: 90388fdeec253d178bb69366f6222c71f9cc38a4
2 files changed