| Index: net/filter/brotli_source_stream.cc
|
| diff --git a/net/filter/brotli_source_stream.cc b/net/filter/brotli_source_stream.cc
|
| index 453ccac09e61e80e3314d302f0ccdedc8e1e3d03..d42ae99b99f75fdd11e8fc3c9a4326f62cdc4b48 100644
|
| --- a/net/filter/brotli_source_stream.cc
|
| +++ b/net/filter/brotli_source_stream.cc
|
| @@ -10,6 +10,9 @@
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/metrics/histogram_macros.h"
|
| +#include "base/strings/stringprintf.h"
|
| +#include "base/trace_event/memory_allocator_dump.h"
|
| +#include "base/trace_event/process_memory_dump.h"
|
| #include "net/base/io_buffer.h"
|
| #include "third_party/brotli/dec/decode.h"
|
|
|
| @@ -73,6 +76,18 @@ class BrotliSourceStream : public FilterSourceStream {
|
| kBuckets);
|
| }
|
|
|
| + void DumpMemoryStatsImpl(
|
| + base::trace_event::MemoryAllocatorDump* dump) const override {
|
| + // Log pointer address to avoid duplication though in practice there is
|
| + // often only one BrotliSourceStream per URLRequest.
|
| + base::trace_event::MemoryAllocatorDump* brotli_dump =
|
| + dump->process_memory_dump()->CreateAllocatorDump(base::StringPrintf(
|
| + "%s/brotli_%p", dump->absolute_name().c_str(), this));
|
| + brotli_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
|
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes,
|
| + used_memory_);
|
| + }
|
| +
|
| private:
|
| // Reported in UMA and must be kept in sync with the histograms.xml file.
|
| enum class DecodingStatus : int {
|
|
|