Fix overflow when logging MaxInt32 to a sparse histogram.

The problem was that a bucket gets reported with an inclusive
min value and exclusive max value, so max must to be +1 of
the sample value for a sparse histogram value.

Because the code wasn't handling this specifically, it caused the
bucket max to be reported as a MinInt32 due to overflow of a 32
bit value. This CL changes the relevant iterator API to use int64_t
for the max, to support MaxInt32 being logged.

BUG=716600
TBR=jbauman@chromium.org, groby@chromium.org

Review-Url: https://codereview.chromium.org/2853853002
Cr-Commit-Position: refs/heads/master@{#469136}


CrOS-Libchrome-Original-Commit: 3f17b1463420e026459e2d7fde6335cf5e9b1852
11 files changed
tree: 16f4db2b49cde9934806300bc8939aeea0d4d7a3
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/