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

Unified Diff: base/trace_event/memory_dump_manager.h

Issue 1308403002: [Tracing] Disable registration of regular dump providers during tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reland-content-browsertest
Patch Set: Address review issues 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') | base/trace_event/memory_dump_manager.cc » ('J')
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 dfaf3a1fc9e0e16a226a5f833c50d648e4629fde..e18d5617486a66a184c325533503997849853155 100644
--- a/base/trace_event/memory_dump_manager.h
+++ b/base/trace_event/memory_dump_manager.h
@@ -102,6 +102,16 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
disable_periodic_dumps_for_testing_ = true;
}
+ // When true, calling RegisterMemoryDumpProvider is a no-op.
+ bool ignore_dumper_registrations_for_testing() const {
+ return ignore_dumper_registrations_for_testing_;
+ }
+
+ void set_ignore_dumper_registrations_for_testing(bool ignore) {
+ ignore_dumper_registrations_for_testing_ = ignore;
+ }
+
+
private:
friend struct DefaultDeleter<MemoryDumpManager>; // For the testing instance.
friend struct DefaultSingletonTraits<MemoryDumpManager>;
@@ -224,8 +234,8 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver {
// Name of the allocated_objects dump.
const char* system_allocator_pool_name_;
- // Skips the auto-registration of the core dumpers during Initialize().
- bool skip_core_dumpers_auto_registration_for_testing_;
+ // When true, calling RegisterMemoryDumpProvider is a no-op.
+ bool ignore_dumper_registrations_for_testing_;
// When true, the initialization phase does not start the periodic memory
// dumps.
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | base/trace_event/memory_dump_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698