Remove TracePacket::Decode and protobuf dependencies
Turns out TracePacket::Decode is used only in tests. Tests
don't justify the complexity of using the SlicedInputStream
(which is going to be deleted by an upcoming CL). Instead
just expose a GetRawBytesForTesting() method and use
explicit deserialization in tests.
Bug: 132880619
Bug: 140126865
Change-Id: I7b8e1422b320b76661438fd18c46186fb82e93ce
diff --git a/test/test_helper.cc b/test/test_helper.cc
index e4af816..57e8b10 100644
--- a/test/test_helper.cc
+++ b/test/test_helper.cc
@@ -61,7 +61,8 @@
void TestHelper::OnTraceData(std::vector<TracePacket> packets, bool has_more) {
for (auto& encoded_packet : packets) {
protos::TracePacket packet;
- PERFETTO_CHECK(encoded_packet.Decode(&packet));
+ PERFETTO_CHECK(
+ packet.ParseFromString(encoded_packet.GetRawBytesForTesting()));
if (packet.has_clock_snapshot() || packet.has_trace_config() ||
packet.has_trace_stats() || !packet.synchronization_marker().empty() ||
packet.has_system_info()) {