| 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 COMPONENTS_METRICS_CHILD_CALL_STACK_PROFILE_COLLECTOR_H_ | 5 #ifndef COMPONENTS_METRICS_CHILD_CALL_STACK_PROFILE_COLLECTOR_H_ |
| 6 #define COMPONENTS_METRICS_CHILD_CALL_STACK_PROFILE_COLLECTOR_H_ | 6 #define COMPONENTS_METRICS_CHILD_CALL_STACK_PROFILE_COLLECTOR_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 12 #include "components/metrics/public/interfaces/call_stack_profile_collector.mojo
m.h" | 12 #include "components/metrics/public/interfaces/call_stack_profile_collector.mojo
m.h" |
| 13 | 13 |
| 14 namespace shell { | 14 namespace service_manager { |
| 15 class InterfaceProvider; | 15 class InterfaceProvider; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace metrics { | 18 namespace metrics { |
| 19 | 19 |
| 20 // ChildCallStackProfileCollector collects stacks at startup, caching them | 20 // ChildCallStackProfileCollector collects stacks at startup, caching them |
| 21 // internally until a CallStackProfileCollector interface is available. If a | 21 // internally until a CallStackProfileCollector interface is available. If a |
| 22 // CallStackProfileCollector is provided via the InterfaceProvider supplied to | 22 // CallStackProfileCollector is provided via the InterfaceProvider supplied to |
| 23 // SetParentProfileCollector, the cached stacks are sent via that interface. All | 23 // SetParentProfileCollector, the cached stacks are sent via that interface. All |
| 24 // future stacks received via callbacks supplied by GetProfilerCallback are sent | 24 // future stacks received via callbacks supplied by GetProfilerCallback are sent |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Profiles being cached by this object, pending a parent interface to be | 111 // Profiles being cached by this object, pending a parent interface to be |
| 112 // supplied. | 112 // supplied. |
| 113 std::vector<ProfilesState> profiles_; | 113 std::vector<ProfilesState> profiles_; |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(ChildCallStackProfileCollector); | 115 DISALLOW_COPY_AND_ASSIGN(ChildCallStackProfileCollector); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 } // namespace metrics | 118 } // namespace metrics |
| 119 | 119 |
| 120 #endif // COMPONENTS_METRICS_CHILD_CALL_STACK_PROFILE_COLLECTOR_H_ | 120 #endif // COMPONENTS_METRICS_CHILD_CALL_STACK_PROFILE_COLLECTOR_H_ |
| OLD | NEW |