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 COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_IMPL_H_ | 5 #ifndef COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_IMPL_H_ |
6 #define COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_IMPL_H_ | 6 #define COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // allocs and frees. | 32 // allocs and frees. |
33 template <typename T> | 33 template <typename T> |
34 using InternalList = std::list<T, STLAllocator<T, CustomAllocator>>; | 34 using InternalList = std::list<T, STLAllocator<T, CustomAllocator>>; |
35 template <typename T> | 35 template <typename T> |
36 using InternalVector = std::vector<T, STLAllocator<T, CustomAllocator>>; | 36 using InternalVector = std::vector<T, STLAllocator<T, CustomAllocator>>; |
37 | 37 |
38 // Leak report generated by LeakDetectorImpl. | 38 // Leak report generated by LeakDetectorImpl. |
39 class LeakReport { | 39 class LeakReport { |
40 public: | 40 public: |
41 LeakReport(); | 41 LeakReport(); |
| 42 LeakReport(const LeakReport& other); |
42 ~LeakReport(); | 43 ~LeakReport(); |
43 | 44 |
44 size_t alloc_size_bytes() const { return alloc_size_bytes_; } | 45 size_t alloc_size_bytes() const { return alloc_size_bytes_; } |
45 | 46 |
46 const InternalVector<uintptr_t>& call_stack() const { return call_stack_; } | 47 const InternalVector<uintptr_t>& call_stack() const { return call_stack_; } |
47 | 48 |
48 const InternalVector<InternalVector<uint32_t>>& size_breakdown_history() | 49 const InternalVector<InternalVector<uint32_t>>& size_breakdown_history() |
49 const { | 50 const { |
50 return size_breakdown_history_; | 51 return size_breakdown_history_; |
51 } | 52 } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // considered a leak suspect. | 176 // considered a leak suspect. |
176 int call_stack_suspicion_threshold_; | 177 int call_stack_suspicion_threshold_; |
177 | 178 |
178 DISALLOW_COPY_AND_ASSIGN(LeakDetectorImpl); | 179 DISALLOW_COPY_AND_ASSIGN(LeakDetectorImpl); |
179 }; | 180 }; |
180 | 181 |
181 } // namespace leak_detector | 182 } // namespace leak_detector |
182 } // namespace metrics | 183 } // namespace metrics |
183 | 184 |
184 #endif // COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_IMPL_H_ | 185 #endif // COMPONENTS_METRICS_LEAK_DETECTOR_LEAK_DETECTOR_IMPL_H_ |
OLD | NEW |