Chromium Code Reviews| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 // Descriptor struct used to hold information about registered MDPs. It is | 85 // Descriptor struct used to hold information about registered MDPs. It is |
| 86 // deliberately copyable, in order to allow to be used as hash_map value. | 86 // deliberately copyable, in order to allow to be used as hash_map value. |
| 87 struct MemoryDumpProviderInfo { | 87 struct MemoryDumpProviderInfo { |
| 88 MemoryDumpProviderInfo( | 88 MemoryDumpProviderInfo( |
| 89 const scoped_refptr<SingleThreadTaskRunner>& task_runner); | 89 const scoped_refptr<SingleThreadTaskRunner>& task_runner); |
| 90 ~MemoryDumpProviderInfo(); | 90 ~MemoryDumpProviderInfo(); |
| 91 | 91 |
| 92 scoped_refptr<SingleThreadTaskRunner> task_runner; // Optional. | 92 scoped_refptr<SingleThreadTaskRunner> task_runner; // Optional. |
| 93 int failures; // Number of times the provider failed (to disable the MDPs). | |
|
Primiano Tucci (use gerrit)
2015/06/10 23:37:07
nit consecutive_failures
ssid
2015/06/12 14:37:00
Done.
| |
| 93 bool disabled; // For fail-safe logic (auto-disable failing MDPs). | 94 bool disabled; // For fail-safe logic (auto-disable failing MDPs). |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 friend struct DefaultDeleter<MemoryDumpManager>; // For the testing instance. | 97 friend struct DefaultDeleter<MemoryDumpManager>; // For the testing instance. |
| 97 friend struct DefaultSingletonTraits<MemoryDumpManager>; | 98 friend struct DefaultSingletonTraits<MemoryDumpManager>; |
| 98 friend class MemoryDumpManagerDelegate; | 99 friend class MemoryDumpManagerDelegate; |
| 99 friend class MemoryDumpManagerTest; | 100 friend class MemoryDumpManagerTest; |
| 100 | 101 |
| 101 static void SetInstanceForTesting(MemoryDumpManager* instance); | 102 static void SetInstanceForTesting(MemoryDumpManager* instance); |
| 102 | 103 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 } | 162 } |
| 162 | 163 |
| 163 private: | 164 private: |
| 164 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); | 165 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); |
| 165 }; | 166 }; |
| 166 | 167 |
| 167 } // namespace trace_event | 168 } // namespace trace_event |
| 168 } // namespace base | 169 } // namespace base |
| 169 | 170 |
| 170 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ | 171 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ |
| OLD | NEW |