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
tree: 7c31eb3e21f3df22128b83784003d854192f2784
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/