Index: net/filter/filter_source_stream.h |
diff --git a/net/filter/filter_source_stream.h b/net/filter/filter_source_stream.h |
index 3d24bd1a92116f0079702c16436a2ed334753ce0..9ea2b3f76c9d290e773992d04eac73ceec269bd3 100644 |
--- a/net/filter/filter_source_stream.h |
+++ b/net/filter/filter_source_stream.h |
@@ -15,6 +15,12 @@ |
#include "net/base/net_export.h" |
#include "net/filter/source_stream.h" |
+namespace base { |
+namespace trace_event { |
+class ProcessMemoryDump; |
+} |
+} |
+ |
namespace net { |
class DrainableIOBuffer; |
@@ -38,6 +44,10 @@ class NET_EXPORT_PRIVATE FilterSourceStream : public SourceStream { |
std::string Description() const override; |
+ void DumpMemoryStats( |
+ base::trace_event::ProcessMemoryDump* dump, |
+ const std::string& parent_dump_absolute_name) const override; |
+ |
private: |
enum State { |
STATE_NONE, |
@@ -78,6 +88,13 @@ class NET_EXPORT_PRIVATE FilterSourceStream : public SourceStream { |
int* consumed_bytes, |
bool upstream_eof_reached) = 0; |
+ // Subclasses can implement this method to dump memory allocation stats. |
+ // Subclasses should override this method instead of DumpMemoryStats |
+ // so the whole chain of FilterSourceStream can be accounted for. |
+ virtual void DumpMemoryStatsImpl( |
+ base::trace_event::ProcessMemoryDump* dump, |
+ const std::string& parent_dump_absolute_name) const; |
+ |
// Returns a string representation of the type of this FilterSourceStream. |
// This is for UMA logging. |
virtual std::string GetTypeAsString() const = 0; |