Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: components/metrics/profiler/profiler_metrics_provider.h

Issue 577823002: Moves ProfilerMetricsProvider to //components/metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_METRICS_PROFILER_METRICS_PROVIDER_H_ 5 #ifndef COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_
6 #define CHROME_BROWSER_METRICS_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 "components/metrics/metrics_provider.h" 9 #include "components/metrics/metrics_provider.h"
10 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" 10 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h"
11 11
12 namespace tracked_objects { 12 namespace tracked_objects {
13 struct ProcessDataSnapshot; 13 struct ProcessDataSnapshot;
14 } 14 }
15 15
16 namespace metrics {
17
16 // ProfilerMetricsProvider is responsible for filling out the |profiler_event| 18 // ProfilerMetricsProvider is responsible for filling out the |profiler_event|
17 // section of the UMA proto. 19 // section of the UMA proto.
18 class ProfilerMetricsProvider : public metrics::MetricsProvider { 20 class ProfilerMetricsProvider : public MetricsProvider {
19 public: 21 public:
20 ProfilerMetricsProvider(); 22 ProfilerMetricsProvider();
21 virtual ~ProfilerMetricsProvider(); 23 virtual ~ProfilerMetricsProvider();
22 24
23 // metrics::MetricsDataProvider: 25 // MetricsDataProvider:
24 virtual void ProvideGeneralMetrics( 26 virtual void ProvideGeneralMetrics(
25 metrics::ChromeUserMetricsExtension* uma_proto) OVERRIDE; 27 ChromeUserMetricsExtension* uma_proto) OVERRIDE;
26 28
27 // Records the passed profiled data, which should be a snapshot of the 29 // Records the passed profiled data, which should be a snapshot of the
28 // browser's profiled performance during startup for a single process. 30 // browser's profiled performance during startup for a single process.
29 void RecordProfilerData( 31 void RecordProfilerData(
30 const tracked_objects::ProcessDataSnapshot& process_data, 32 const tracked_objects::ProcessDataSnapshot& process_data,
31 int process_type); 33 int process_type);
32 34
33 private: 35 private:
34 // Saved cache of generated Profiler event protos, to be copied into the UMA 36 // Saved cache of generated Profiler event protos, to be copied into the UMA
35 // proto when ProvideGeneralMetrics() is called. 37 // proto when ProvideGeneralMetrics() is called.
36 metrics::ProfilerEventProto profiler_event_cache_; 38 ProfilerEventProto profiler_event_cache_;
37 39
38 // True if this instance has recorded profiler data since the last call to 40 // True if this instance has recorded profiler data since the last call to
39 // ProvideGeneralMetrics(). 41 // ProvideGeneralMetrics().
40 bool has_profiler_data_; 42 bool has_profiler_data_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(ProfilerMetricsProvider); 44 DISALLOW_COPY_AND_ASSIGN(ProfilerMetricsProvider);
43 }; 45 };
44 46
45 #endif // CHROME_BROWSER_METRICS_PROFILER_METRICS_PROVIDER_H_ 47 } // namespace metrics
48
49 #endif // COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/metrics/profiler/DEPS ('k') | components/metrics/profiler/profiler_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698