OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PROFILER_PROFILER_METRICS_PROVIDER_H_ | 5 #ifndef COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_ |
6 #define COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_ | 6 #define COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "components/metrics/metrics_provider.h" | 10 #include "components/metrics/metrics_provider.h" |
11 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" | 11 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" |
12 | 12 |
13 namespace tracked_objects { | 13 namespace tracked_objects { |
14 struct ProcessDataSnapshot; | 14 struct ProcessDataSnapshot; |
15 } | 15 } |
16 | 16 |
17 namespace metrics { | 17 namespace metrics { |
18 | 18 |
19 // ProfilerMetricsProvider is responsible for filling out the |profiler_event| | 19 // ProfilerMetricsProvider is responsible for filling out the |profiler_event| |
20 // section of the UMA proto. | 20 // section of the UMA proto. |
21 class ProfilerMetricsProvider : public MetricsProvider { | 21 class ProfilerMetricsProvider : public MetricsProvider { |
22 public: | 22 public: |
23 ProfilerMetricsProvider(); | |
Alexei Svitkine (slow)
2015/02/25 17:39:45
Nit: Add a comment that this creates the provider
gayane -on leave until 09-2017
2015/02/25 18:21:05
Done.
| |
23 explicit ProfilerMetricsProvider( | 24 explicit ProfilerMetricsProvider( |
24 const base::Callback<void(bool*)>& cellular_callback); | 25 const base::Callback<void(bool*)>& cellular_callback); |
25 ~ProfilerMetricsProvider() override; | 26 ~ProfilerMetricsProvider() override; |
26 | 27 |
27 // MetricsDataProvider: | 28 // MetricsDataProvider: |
28 void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override; | 29 void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override; |
29 | 30 |
30 // Records the passed profiled data, which should be a snapshot of the | 31 // Records the passed profiled data, which should be a snapshot of the |
31 // browser's profiled performance during startup for a single process. | 32 // browser's profiled performance during startup for a single process. |
32 void RecordProfilerData( | 33 void RecordProfilerData( |
(...skipping 15 matching lines...) Expand all Loading... | |
48 | 49 |
49 // Callback function used to get current network connection type. | 50 // Callback function used to get current network connection type. |
50 base::Callback<void(bool*)> cellular_callback_; | 51 base::Callback<void(bool*)> cellular_callback_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(ProfilerMetricsProvider); | 53 DISALLOW_COPY_AND_ASSIGN(ProfilerMetricsProvider); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace metrics | 56 } // namespace metrics |
56 | 57 |
57 #endif // COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_ | 58 #endif // COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_ |
OLD | NEW |