Chromium Code Reviews| Index: base/trace_event/memory_dump_manager.h |
| diff --git a/base/trace_event/memory_dump_manager.h b/base/trace_event/memory_dump_manager.h |
| index 4e5f8a2f77d00afae4d3cffc59678a19421071e5..fde2fffb8f3d1f9bb50bd292ae6fc0b1334b7e58 100644 |
| --- a/base/trace_event/memory_dump_manager.h |
| +++ b/base/trace_event/memory_dump_manager.h |
| @@ -46,7 +46,7 @@ class MemoryDumpSessionState; |
| // This is the interface exposed to the rest of the codebase to deal with |
| // memory tracing. The main entry point for clients is represented by |
| // RequestDumpPoint(). The extension by Un(RegisterDumpProvider). |
| -class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
| +class BASE_EXPORT MemoryDumpManager { |
| public: |
| static const char* const kTraceCategory; |
| static const char* const kLogPrefix; |
| @@ -119,9 +119,9 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
| void RequestGlobalDump(MemoryDumpType dump_type, |
| MemoryDumpLevelOfDetail level_of_detail); |
| - // TraceLog::EnabledStateObserver implementation. |
| - void OnTraceLogEnabled() override; |
| - void OnTraceLogDisabled() override; |
| + // XXX |
| + virtual void Enable(); |
|
Primiano Tucci (use gerrit)
2017/04/13 15:22:37
out of cusiority, why virtual?
hjd
2017/04/13 16:32:18
So we can mock it in the frontend tests.
hjd
2017/04/19 09:54:56
If we don't want to test this for now I will undo
|
| + virtual void Disable(); |
| // Enable heap profiling if kEnableHeapProfiling is specified. |
| void EnableHeapProfilingIfNeeded(); |
| @@ -167,6 +167,8 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
| friend struct DefaultSingletonTraits<MemoryDumpManager>; |
| friend class MemoryDumpManagerDelegate; |
| friend class MemoryDumpManagerTest; |
| + friend class MemoryTracingFrontendTest; |
| + friend class MockMemoryDumpManager; |
| friend class memory_instrumentation::MemoryDumpManagerDelegateImplTest; |
| // Holds the state of a process memory dump that needs to be carried over |
| @@ -230,7 +232,7 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
| static const char* const kSystemAllocatorPoolName; |
| MemoryDumpManager(); |
| - ~MemoryDumpManager() override; |
| + virtual ~MemoryDumpManager(); |
| static void SetInstanceForTesting(MemoryDumpManager* instance); |
| static uint32_t GetDumpsSumKb(const std::string&, const ProcessMemoryDump*); |