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

Side by Side Diff: base/trace_event/memory_dump_provider.h

Issue 2006943003: [tracing] Sanitize process memory dumps for background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@whitelist_mdp
Patch Set: Fix stripping. Created 4 years, 6 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
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 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
11 #include "base/trace_event/memory_dump_request_args.h" 11 #include "base/trace_event/memory_dump_request_args.h"
12 12
13 namespace base { 13 namespace base {
14 namespace trace_event { 14 namespace trace_event {
15 15
16 class ProcessMemoryDump; 16 class ProcessMemoryDump;
17 17
18 // Args passed to OnMemoryDump(). This is to avoid rewriting all the subclasses
19 // in the codebase when extending the MemoryDumpProvider API.
20 struct MemoryDumpArgs {
21 MemoryDumpLevelOfDetail level_of_detail;
22 };
23
24 // The contract interface that memory dump providers must implement. 18 // The contract interface that memory dump providers must implement.
25 class BASE_EXPORT MemoryDumpProvider { 19 class BASE_EXPORT MemoryDumpProvider {
26 public: 20 public:
27 // Optional arguments for MemoryDumpManager::RegisterDumpProvider(). 21 // Optional arguments for MemoryDumpManager::RegisterDumpProvider().
28 struct Options { 22 struct Options {
29 Options() 23 Options()
30 : target_pid(kNullProcessId), 24 : target_pid(kNullProcessId),
31 dumps_on_single_thread_task_runner(false) {} 25 dumps_on_single_thread_task_runner(false) {}
32 26
33 // If the dump provider generates dumps on behalf of another process, 27 // If the dump provider generates dumps on behalf of another process,
(...skipping 27 matching lines...) Expand all
61 protected: 55 protected:
62 MemoryDumpProvider() {} 56 MemoryDumpProvider() {}
63 57
64 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider); 58 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProvider);
65 }; 59 };
66 60
67 } // namespace trace_event 61 } // namespace trace_event
68 } // namespace base 62 } // namespace base
69 63
70 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_ 64 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/memory_dump_request_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698