OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_METRICS_SUBPROCESS_METRICS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_SUBPROCESS_METRICS_PROVIDER_H_ |
6 #define CHROME_BROWSER_METRICS_SUBPROCESS_METRICS_PROVIDER_H_ | 6 #define CHROME_BROWSER_METRICS_SUBPROCESS_METRICS_PROVIDER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 static std::unique_ptr<base::PersistentHistogramAllocator> | 91 static std::unique_ptr<base::PersistentHistogramAllocator> |
92 GetSubprocessHistogramAllocatorOnIOThread(int id); | 92 GetSubprocessHistogramAllocatorOnIOThread(int id); |
93 | 93 |
94 base::ThreadChecker thread_checker_; | 94 base::ThreadChecker thread_checker_; |
95 | 95 |
96 // Object for registing notification requests. | 96 // Object for registing notification requests. |
97 content::NotificationRegistrar registrar_; | 97 content::NotificationRegistrar registrar_; |
98 | 98 |
99 // All of the shared-persistent-allocators for known sub-processes. | 99 // All of the shared-persistent-allocators for known sub-processes. |
100 using AllocatorByIdMap = | 100 using AllocatorByIdMap = |
101 IDMap<base::PersistentHistogramAllocator, IDMapOwnPointer, int>; | 101 IDMap<std::unique_ptr<base::PersistentHistogramAllocator>, int>; |
102 AllocatorByIdMap allocators_by_id_; | 102 AllocatorByIdMap allocators_by_id_; |
103 | 103 |
104 // Track all observed render processes to un-observe them on exit. | 104 // Track all observed render processes to un-observe them on exit. |
105 ScopedObserver<content::RenderProcessHost, SubprocessMetricsProvider> | 105 ScopedObserver<content::RenderProcessHost, SubprocessMetricsProvider> |
106 scoped_observer_; | 106 scoped_observer_; |
107 | 107 |
108 base::WeakPtrFactory<SubprocessMetricsProvider> weak_ptr_factory_; | 108 base::WeakPtrFactory<SubprocessMetricsProvider> weak_ptr_factory_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(SubprocessMetricsProvider); | 110 DISALLOW_COPY_AND_ASSIGN(SubprocessMetricsProvider); |
111 }; | 111 }; |
112 | 112 |
113 #endif // CHROME_BROWSER_METRICS_SUBPROCESS_METRICS_PROVIDER_H_ | 113 #endif // CHROME_BROWSER_METRICS_SUBPROCESS_METRICS_PROVIDER_H_ |
OLD | NEW |