| Index: components/tracing/core/trace_buffer_writer.cc
|
| diff --git a/components/tracing/core/trace_buffer_writer.cc b/components/tracing/core/trace_buffer_writer.cc
|
| index 7cd9b1356b5aee78d9b54fc051621b953530862b..b811eeb9419cea535a141365aecaf4b95afb18ad 100644
|
| --- a/components/tracing/core/trace_buffer_writer.cc
|
| +++ b/components/tracing/core/trace_buffer_writer.cc
|
| @@ -7,23 +7,14 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/logging.h"
|
| #include "components/tracing/core/proto_utils.h"
|
| +#include "components/tracing/proto/events_chunk.pbzero.h"
|
|
|
| namespace tracing {
|
| namespace v2 {
|
|
|
| namespace {
|
|
|
| -// TODO(primiano) remove this in next CLs. This should just be taken from the
|
| -// C++ class autogenerated from events_chunk.proto (crbug.com/608721).
|
| -struct ChunkProto {
|
| - enum : uint32_t {
|
| - kWriterIdFieldNumber = 1,
|
| - kSeqIdInStreamFieldNumber = 2,
|
| - kEventsFieldNumber = 3,
|
| - kFirstEventContinuesFromPrevChunkFieldNumber = 4,
|
| - kLastEventContinuesOnNextChunkFieldNumber = 5
|
| - };
|
| -};
|
| +using ChunkProto = pbzero::tracing::proto::EventsChunk;
|
|
|
| const size_t kEventPreambleSize = 1 + proto::kMessageLengthFieldSize;
|
|
|
| @@ -160,9 +151,9 @@ ContiguousMemoryRange TraceBufferWriter::AcquireNewChunk(
|
| chunk_proto = proto::WriteVarInt(writer_id_, chunk_proto);
|
|
|
| proto::StaticAssertSingleBytePreamble<
|
| - ChunkProto::kSeqIdInStreamFieldNumber>();
|
| + ChunkProto::kSeqIdFieldNumber>();
|
| *chunk_proto++ = static_cast<uint8_t>(
|
| - proto::MakeTagVarInt(ChunkProto::kSeqIdInStreamFieldNumber));
|
| + proto::MakeTagVarInt(ChunkProto::kSeqIdFieldNumber));
|
| chunk_proto = proto::WriteVarInt(chunk_seq_id_, chunk_proto);
|
|
|
| if (is_fragmenting_event) {
|
|
|