| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 friend struct DefaultSingletonTraits<MemoryDumpManager>; | 119 friend struct DefaultSingletonTraits<MemoryDumpManager>; |
| 120 friend class MemoryDumpManagerDelegate; | 120 friend class MemoryDumpManagerDelegate; |
| 121 friend class MemoryDumpManagerTest; | 121 friend class MemoryDumpManagerTest; |
| 122 FRIEND_TEST_ALL_PREFIXES(MemoryDumpManagerTest, DisableFailingDumpers); | 122 FRIEND_TEST_ALL_PREFIXES(MemoryDumpManagerTest, DisableFailingDumpers); |
| 123 | 123 |
| 124 static const int kMaxConsecutiveFailuresCount; | 124 static const int kMaxConsecutiveFailuresCount; |
| 125 | 125 |
| 126 static void SetInstanceForTesting(MemoryDumpManager* instance); | 126 static void SetInstanceForTesting(MemoryDumpManager* instance); |
| 127 | 127 |
| 128 MemoryDumpManager(); | 128 MemoryDumpManager(); |
| 129 virtual ~MemoryDumpManager(); | 129 ~MemoryDumpManager() override; |
| 130 | 130 |
| 131 // Internal, used only by MemoryDumpManagerDelegate. | 131 // Internal, used only by MemoryDumpManagerDelegate. |
| 132 // Creates a memory dump for the current process and appends it to the trace. | 132 // Creates a memory dump for the current process and appends it to the trace. |
| 133 // |callback| will be invoked asynchronously upon completion on the same | 133 // |callback| will be invoked asynchronously upon completion on the same |
| 134 // thread on which CreateProcessDump() was called. | 134 // thread on which CreateProcessDump() was called. |
| 135 void CreateProcessDump(const MemoryDumpRequestArgs& args, | 135 void CreateProcessDump(const MemoryDumpRequestArgs& args, |
| 136 const MemoryDumpCallback& callback); | 136 const MemoryDumpCallback& callback); |
| 137 | 137 |
| 138 bool InvokeDumpProviderLocked(MemoryDumpProvider* mdp, | 138 bool InvokeDumpProviderLocked(MemoryDumpProvider* mdp, |
| 139 ProcessMemoryDump* pmd); | 139 ProcessMemoryDump* pmd); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 } | 201 } |
| 202 | 202 |
| 203 private: | 203 private: |
| 204 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 204 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 } // namespace trace_event | 207 } // namespace trace_event |
| 208 } // namespace base | 208 } // namespace base |
| 209 | 209 |
| 210 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 210 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| OLD | NEW |