Annotate trace packets with a trusted producer uid

This patch adds a trusted uid field to the trace packet message, which
identifies the POSIX user account which submitted the associated trace
data to the tracing service. The field is created by the service in a
way that makes it unspoofable. Later we will also include a mapping
from package names to uids in the trace.

Bug: 69964495,73283884
Change-Id: I8fdacdd00ab8efd5d5bca7d4b164dd3c4c7f0741
diff --git a/test/fake_producer.h b/test/fake_producer.h
index 5b61468..68a89e1 100644
--- a/test/fake_producer.h
+++ b/test/fake_producer.h
@@ -33,7 +33,9 @@
   explicit FakeProducer(const std::string& name);
   ~FakeProducer() override;
 
-  void Connect(const char* socket_name, base::TaskRunner* task_runner);
+  void Connect(const char* socket_name,
+               base::TaskRunner* task_runner,
+               std::function<void()> data_produced_callback);
 
   // Producer implementation.
   void OnConnect() override;
@@ -48,6 +50,8 @@
   std::string name_;
   DataSourceID id_ = 0;
   std::unique_ptr<Service::ProducerEndpoint> endpoint_;
+  base::TaskRunner* task_runner_ = nullptr;
+  std::function<void()> data_produced_callback_;
 };
 
 }  // namespace perfetto