base: Make TimeDurationFormat* report failures.

Update base::TimeDurationFormat() and
base::TimeDurationFormatWithSeconds() to return boolean
"success" values and use out-params to return formatted
strings. ICU errors were formerly swallowed, which makes it
impossible for the UI to handle them gracefully or for
developers to investigate their causes.

BUG=698802,677043

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


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