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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1275013005: [tracing] Disable memory maps dump provider for security reason (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing telemetry. 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 | content/browser/gpu/gpu_process_host.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.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index f9ba3ae5a134b23dcef8cfcb99a9e24a9e25fb44..9719305dff6ef9baf3dfa18102d6c0518e8abee2 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -118,8 +118,15 @@ void MemoryDumpManager::Initialize() {
#endif
#if defined(OS_LINUX) || defined(OS_ANDROID)
- g_mmaps_dump_provider = ProcessMemoryMapsDumpProvider::GetInstance();
- RegisterDumpProvider(g_mmaps_dump_provider);
+ // The memory maps dump provider is currently disabled for security reasons
+ // and will be enabled once tracing is more secure (crbug.com/517906).
+ // It is still enabled for running benchmarks.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ "enable-memory-benchmarking")) {
mdempsky 2015/08/07 22:48:25 Shouldn't this be switches::kEnableMemoryBenchmark
ssid 2015/08/07 22:58:06 actually base does not know about content switches
mdempsky 2015/08/07 23:01:59 Ah, fair point.
+ g_mmaps_dump_provider = ProcessMemoryMapsDumpProvider::GetInstance();
+ RegisterDumpProvider(g_mmaps_dump_provider);
+ }
+
RegisterDumpProvider(MallocDumpProvider::GetInstance());
system_allocator_pool_name_ = MallocDumpProvider::kAllocatedObjects;
#endif
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698