| Index: components/tracing/core/proto_utils.h
|
| diff --git a/components/tracing/core/proto_utils.h b/components/tracing/core/proto_utils.h
|
| index 68599199688e98f0182aeb874a4e6e15e0585f2d..dfa983e0297c599c9dfda0a3690ef1ab6ae39842 100644
|
| --- a/components/tracing/core/proto_utils.h
|
| +++ b/components/tracing/core/proto_utils.h
|
| @@ -95,6 +95,12 @@ void WriteRedundantVarIntU32(uint32_t value, uint8_t* buf) {
|
| DCHECK_EQ(0u, value) << "Buffer too short to encode the given value";
|
| }
|
|
|
| +template <uint32_t field_id>
|
| +void StaticAssertSingleBytePreamble() {
|
| + static_assert(field_id < 16,
|
| + "Proto field id too big to fit in a single byte preamble");
|
| +};
|
| +
|
| } // namespace proto
|
| } // namespace v2
|
| } // namespace tracing
|
|
|