Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 1308443002: Reland of "[tracing] Add browser-side tests for memory dumps." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto https://crrev.com/1289793007 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698