OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_ | |
6 #define CHROME_BROWSER_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/profiler/stack_sampling_profiler.h" | |
11 #include "components/metrics/metrics_provider.h" | |
12 | |
13 namespace metrics { | |
14 class ChromeUserMetricsExtension; | |
15 } | |
16 | |
17 // Performs metrics logging for the stack sampling profiler. | |
18 class CallStackProfileMetricsProvider : public metrics::MetricsProvider { | |
Alexei Svitkine (slow)
2015/03/17 23:10:10
If this only depends on code in base and the metri
Mike Wittman
2015/03/18 01:48:35
Done.
| |
19 public: | |
20 CallStackProfileMetricsProvider(); | |
21 ~CallStackProfileMetricsProvider() override; | |
22 | |
23 // metrics::MetricsProvider: | |
24 void ProvideGeneralMetrics( | |
25 metrics::ChromeUserMetricsExtension* uma_proto) override; | |
26 | |
27 // Uses |profiles| as the source data for the next invocation of | |
28 // ProvideGeneralMetrics, rather than sourcing them from the | |
29 // StackSamplingProfiler. | |
30 void SetSourceProfilesForTest( | |
Alexei Svitkine (slow)
2015/03/17 23:10:10
Nit: metrics code prefers ForTesting
Mike Wittman
2015/03/18 01:48:36
Done.
| |
31 const std::vector<base::StackSamplingProfiler::Profile>& profiles); | |
32 | |
33 private: | |
34 std::vector<base::StackSamplingProfiler::Profile> source_profiles_for_test_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(CallStackProfileMetricsProvider); | |
37 }; | |
38 | |
39 #endif // CHROME_BROWSER_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_ | |
OLD | NEW |