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 fc32270600a2aa626862961e80dcc9d2a63a79a1..dfaf3a1fc9e0e16a226a5f833c50d648e4629fde 100644 |
--- a/base/trace_event/memory_dump_manager.h |
+++ b/base/trace_event/memory_dump_manager.h |
@@ -97,6 +97,11 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
return system_allocator_pool_name_; |
}; |
+ // Tells the initialization phase to skip scheduling periodic memory dumps. |
+ void DisablePeriodicDumpsForTesting() { |
+ disable_periodic_dumps_for_testing_ = true; |
+ } |
+ |
private: |
friend struct DefaultDeleter<MemoryDumpManager>; // For the testing instance. |
friend struct DefaultSingletonTraits<MemoryDumpManager>; |
@@ -222,6 +227,11 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { |
// Skips the auto-registration of the core dumpers during Initialize(). |
bool skip_core_dumpers_auto_registration_for_testing_; |
+ // When true, the initialization phase does not start the periodic memory |
+ // dumps. |
+ // TODO(primiano): This should go into TraceConfig. https://goo.gl/5Hj3o0. |
+ bool disable_periodic_dumps_for_testing_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MemoryDumpManager); |
}; |