metrics: Disable uploader on non-official build.

The metrics uploader should only be enabled on an official build.

BUG=chromium:459105
TEST=`FEATURES=test emerge-$BOARD metrics`
TEST=Verified that metrics uploader is disabled on a developer build.

Change-Id: I5cadb3afeb56c0adac971228aa48ad56ed913bbf
Reviewed-on: https://chromium-review.googlesource.com/250542
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
diff --git a/metrics/metrics_daemon.h b/metrics/metrics_daemon.h
index 397fd21..d38dcd9 100644
--- a/metrics/metrics_daemon.h
+++ b/metrics/metrics_daemon.h
@@ -273,6 +273,9 @@
   // to a unsigned 32-bit int.
   uint32_t GetOsVersionHash();
 
+  // Returns true if the system is using an official build.
+  bool IsOnOfficialBuild() const;
+
   // Updates stats, additionally sending them to UMA if enough time has elapsed
   // since the last report.
   void UpdateStats(base::TimeTicks now_ticks, base::Time now_wall_time);