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_MANAGER_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // TraceLog::EnabledStateObserver implementation. | 116 // TraceLog::EnabledStateObserver implementation. |
117 void OnTraceLogEnabled() override; | 117 void OnTraceLogEnabled() override; |
118 void OnTraceLogDisabled() override; | 118 void OnTraceLogDisabled() override; |
119 | 119 |
120 // Enable heap profiling if kEnableHeapProfiling is specified. | 120 // Enable heap profiling if kEnableHeapProfiling is specified. |
121 void EnableHeapProfilingIfNeeded(); | 121 void EnableHeapProfilingIfNeeded(); |
122 | 122 |
123 // Returns true if the dump mode is allowed for current tracing session. | 123 // Returns true if the dump mode is allowed for current tracing session. |
124 bool IsDumpModeAllowed(MemoryDumpLevelOfDetail dump_mode); | 124 bool IsDumpModeAllowed(MemoryDumpLevelOfDetail dump_mode); |
125 | 125 |
| 126 // Lets tests see if a dump provider is registered. |
| 127 bool IsDumpProviderRegisteredForTesting(MemoryDumpProvider*); |
| 128 |
126 // Returns the MemoryDumpSessionState object, which is shared by all the | 129 // Returns the MemoryDumpSessionState object, which is shared by all the |
127 // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing | 130 // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing |
128 // session lifetime. | 131 // session lifetime. |
129 const scoped_refptr<MemoryDumpSessionState>& session_state_for_testing() | 132 const scoped_refptr<MemoryDumpSessionState>& session_state_for_testing() |
130 const { | 133 const { |
131 return session_state_; | 134 return session_state_; |
132 } | 135 } |
133 | 136 |
134 // Returns a unique id for identifying the processes. The id can be | 137 // Returns a unique id for identifying the processes. The id can be |
135 // retrieved by child processes only when tracing is enabled. This is | 138 // retrieved by child processes only when tracing is enabled. This is |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 } | 405 } |
403 | 406 |
404 private: | 407 private: |
405 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 408 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
406 }; | 409 }; |
407 | 410 |
408 } // namespace trace_event | 411 } // namespace trace_event |
409 } // namespace base | 412 } // namespace base |
410 | 413 |
411 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 414 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
OLD | NEW |