Index: net/filter/sdch_source_stream.cc |
diff --git a/net/filter/sdch_source_stream.cc b/net/filter/sdch_source_stream.cc |
index c54620e961f6d8162b34f441be8a0e1f0c37e01f..d67773c23bb6f3f9071a0b7f769823a2b74f0702 100644 |
--- a/net/filter/sdch_source_stream.cc |
+++ b/net/filter/sdch_source_stream.cc |
@@ -8,6 +8,9 @@ |
#include "base/bind.h" |
#include "base/logging.h" |
#include "base/numerics/safe_conversions.h" |
+#include "base/strings/stringprintf.h" |
+#include "base/trace_event/memory_allocator_dump.h" |
+#include "base/trace_event/process_memory_dump.h" |
#include "base/values.h" |
#include "net/base/io_buffer.h" |
#include "net/log/net_log_capture_mode.h" |
@@ -54,6 +57,19 @@ std::string SdchSourceStream::GetTypeAsString() const { |
return kSdchPossible; |
} |
+void SdchSourceStream::DumpMemoryStatsImpl( |
+ base::trace_event::ProcessMemoryDump* pmd, |
+ const std::string& parent_dump_absolute_name) const { |
+ // Log pointer address to avoid duplication though in practice there is |
+ // often only one SdchSourceStream per URLRequest. |
+ base::trace_event::MemoryAllocatorDump* sdch_dump = |
+ pmd->CreateAllocatorDump(base::StringPrintf( |
+ "%s/sdch_%p", parent_dump_absolute_name.c_str(), this)); |
+ sdch_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
+ buffered_output_.size()); |
+} |
+ |
int SdchSourceStream::FilterData(IOBuffer* output_buffer, |
int output_buffer_size, |
IOBuffer* input_buffer, |