libchrome: Add presubmit check for Chromium UMA collection code

UMA collection macros or functions from Chromium don't work on CrOS and
send the metrics silently into the void.

Since such collecting code is used in //base changing to #ifdefs that
fail to compile on CrOS isn't feasible.

The hook can be overriden by the developer through --no-verify and this
is fine as it should be a warning but not stopping the author if they
don't need the metrics on CrOS.

BUG=b:298176110
TEST=repo upload of code that collects UMA using Chromium code

Change-Id: I5f2ec7503fb50315ab0e6eada4897252a36dba48
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/libchrome/+/4822575
Tested-by: Christoph Schlosser <cschlosser@chromium.org>
Reviewed-by: Grace Cham <hscham@chromium.org>
Commit-Queue: Christoph Schlosser <cschlosser@chromium.org>
Reviewed-by: Ian Barkley-Yeung <iby@chromium.org>
1 file changed
tree: f8c85f10d2bc3d165a879a953ecd23c5b7ec594a
  1. base/
  2. build/
  3. components/
  4. crypto/
  5. dbus/
  6. device/
  7. ipc/
  8. libchrome_tools/
  9. mojo/
  10. soong/
  11. testing/
  12. third_party/
  13. ui/
  14. .gitignore
  15. BASE_VER
  16. BUILD.gn
  17. BUILD.IGNORE
  18. DIR_METADATA
  19. MODULE_LICENSE_BSD
  20. NOTICE
  21. OWNERS
  22. PRESUBMIT.cfg
  23. README.md
  24. testrunner.cc
  25. unblocked_terms.txt
README.md

libchrome

Overview

This directory includes the source from Chrome's libbase for use in Chrome OS.

See libchrome.md for more info.