OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |