| Index: components/tracing/core/scattered_stream_writer.h
|
| diff --git a/components/tracing/core/scattered_stream_writer.h b/components/tracing/core/scattered_stream_writer.h
|
| index f5b0b770d852c3b16fb8449de2fbe10293b77da6..00af4d70c3a3b56e0ea92b70f51df2503d24d606 100644
|
| --- a/components/tracing/core/scattered_stream_writer.h
|
| +++ b/components/tracing/core/scattered_stream_writer.h
|
| @@ -16,6 +16,10 @@ namespace v2 {
|
| struct ContiguousMemoryRange {
|
| uint8_t* begin;
|
| uint8_t* end; // STL style: one byte past the end of the buffer.
|
| +
|
| + inline bool is_valid() const { return begin != nullptr; }
|
| + inline void reset() { begin = nullptr; }
|
| + inline size_t size() { return static_cast<size_t>(end - begin); }
|
| };
|
|
|
| // This class deals with the following problem: append-only proto messages want
|
|
|