Chromium Code Reviews| Index: components/tracing/core/proto_utils.h |
| diff --git a/components/tracing/core/proto_utils.h b/components/tracing/core/proto_utils.h |
| index 59b147db42faa88bc6acb71f57acd1b98cfce676..cd8d6e82342d1a0251775287f4acaa9797e77120 100644 |
| --- a/components/tracing/core/proto_utils.h |
| +++ b/components/tracing/core/proto_utils.h |
| @@ -26,6 +26,10 @@ enum : uint32_t { |
| kFieldTypeFixed32 = 5, |
| }; |
| +// Maximum message size supported: 256 MiB (4 x 7-bit due to varint encoding). |
| +constexpr size_t kMessageLengthFieldSize = 4; |
| +constexpr size_t kMaxMessageLength = 1u << (kMessageLengthFieldSize * 7); |
|
alph
2016/07/12 00:20:42
-1 to be precise.
Primiano Tucci (use gerrit)
2016/07/12 10:15:32
oh good catch. Done.
|
| + |
| // Returns the number of bytes sufficient to encode the largest |
| // |int_size_in_bits|-bits integer using a non-redundant varint encoding. |
| template <typename T> |