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

Side by Side 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: Rebase. 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/memory_dump_manager.h" 5 #include "base/trace_event/memory_dump_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 if (skip_core_dumpers_auto_registration_for_testing_) 113 if (skip_core_dumpers_auto_registration_for_testing_)
114 return; 114 return;
115 115
116 // Enable the core dump providers. 116 // Enable the core dump providers.
117 #if !defined(OS_NACL) 117 #if !defined(OS_NACL)
118 RegisterDumpProvider(ProcessMemoryTotalsDumpProvider::GetInstance()); 118 RegisterDumpProvider(ProcessMemoryTotalsDumpProvider::GetInstance());
119 #endif 119 #endif
120 120
121 #if defined(OS_LINUX) || defined(OS_ANDROID) 121 #if defined(OS_LINUX) || defined(OS_ANDROID)
122 RegisterDumpProvider(ProcessMemoryMapsDumpProvider::GetInstance()); 122 // The memory maps dump provider is currently disabled for security reasons
123 // and will be enabled once tracing is more secure (crbug.com/517906).
124 // It is still enabled for running benchmarks.
125 if (CommandLine::ForCurrentProcess()->HasSwitch(
126 "enable-memory-benchmarking")) {
127 RegisterDumpProvider(ProcessMemoryMapsDumpProvider::GetInstance());
128 }
129
123 RegisterDumpProvider(MallocDumpProvider::GetInstance()); 130 RegisterDumpProvider(MallocDumpProvider::GetInstance());
124 system_allocator_pool_name_ = MallocDumpProvider::kAllocatedObjects; 131 system_allocator_pool_name_ = MallocDumpProvider::kAllocatedObjects;
125 #endif 132 #endif
126 133
127 #if defined(OS_ANDROID) 134 #if defined(OS_ANDROID)
128 RegisterDumpProvider(JavaHeapDumpProvider::GetInstance()); 135 RegisterDumpProvider(JavaHeapDumpProvider::GetInstance());
129 #endif 136 #endif
130 137
131 #if defined(OS_WIN) 138 #if defined(OS_WIN)
132 RegisterDumpProvider(WinHeapDumpProvider::GetInstance()); 139 RegisterDumpProvider(WinHeapDumpProvider::GetInstance());
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 next_dump_provider(next_dump_provider), 477 next_dump_provider(next_dump_provider),
471 callback(callback), 478 callback(callback),
472 task_runner(MessageLoop::current()->task_runner()) { 479 task_runner(MessageLoop::current()->task_runner()) {
473 } 480 }
474 481
475 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() { 482 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() {
476 } 483 }
477 484
478 } // namespace trace_event 485 } // namespace trace_event
479 } // namespace base 486 } // namespace base
OLDNEW
« 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