wittman | e16da278 | 2016-09-21 16:43:04 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_METRICS_CALL_STACK_PROFILE_COLLECTOR_H_ |
| 6 | #define COMPONENTS_METRICS_CALL_STACK_PROFILE_COLLECTOR_H_ |
| 7 | |
| 8 | #include "base/macros.h" |
| 9 | #include "components/metrics/public/interfaces/call_stack_profile_collector.mojom.h" |
| 10 | |
| 11 | namespace metrics { |
| 12 | |
| 13 | class CallStackProfileCollector : public mojom::CallStackProfileCollector { |
| 14 | public: |
Mike Wittman | 16fa536 | 2018-09-04 17:27:30 | [diff] [blame] | 15 | CallStackProfileCollector(); |
wittman | e16da278 | 2016-09-21 16:43:04 | [diff] [blame] | 16 | ~CallStackProfileCollector() override; |
| 17 | |
wittman | 4472aa9 | 2016-09-22 20:13:46 | [diff] [blame] | 18 | // Create a collector to receive profiles from |expected_process|. |
Mike Wittman | 16fa536 | 2018-09-04 17:27:30 | [diff] [blame] | 19 | static void Create(mojom::CallStackProfileCollectorRequest request); |
wittman | e16da278 | 2016-09-21 16:43:04 | [diff] [blame] | 20 | |
| 21 | // mojom::CallStackProfileCollector: |
Xi Cheng | 4dec7e4 | 2018-08-10 16:54:11 | [diff] [blame] | 22 | void Collect(base::TimeTicks start_timestamp, |
Mike Wittman | 16fa536 | 2018-09-04 17:27:30 | [diff] [blame] | 23 | mojom::SampledProfilePtr profile) override; |
wittman | e16da278 | 2016-09-21 16:43:04 | [diff] [blame] | 24 | |
| 25 | private: |
wittman | e16da278 | 2016-09-21 16:43:04 | [diff] [blame] | 26 | DISALLOW_COPY_AND_ASSIGN(CallStackProfileCollector); |
| 27 | }; |
| 28 | |
| 29 | } // namespace metrics |
| 30 | |
| 31 | #endif // COMPONENTS_METRICS_CALL_STACK_PROFILE_COLLECTOR_H_ |