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

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

Issue 953403002: Constructor without callback added to ProfilerMetricsProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Constructor of provider is moved and comment added Created 5 years, 10 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
« no previous file with comments | « no previous file | components/metrics/profiler/profiler_metrics_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 explicit ProfilerMetricsProvider( 23 explicit ProfilerMetricsProvider(
24 const base::Callback<void(bool*)>& cellular_callback); 24 const base::Callback<void(bool*)>& cellular_callback);
25 // Creates profiler metrics provider with a null callback.
26 ProfilerMetricsProvider();
25 ~ProfilerMetricsProvider() override; 27 ~ProfilerMetricsProvider() override;
26 28
27 // MetricsDataProvider: 29 // MetricsDataProvider:
28 void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override; 30 void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override;
29 31
30 // Records the passed profiled data, which should be a snapshot of the 32 // Records the passed profiled data, which should be a snapshot of the
31 // browser's profiled performance during startup for a single process. 33 // browser's profiled performance during startup for a single process.
32 void RecordProfilerData( 34 void RecordProfilerData(
33 const tracked_objects::ProcessDataSnapshot& process_data, 35 const tracked_objects::ProcessDataSnapshot& process_data,
34 int process_type); 36 int process_type);
(...skipping 13 matching lines...) Expand all
48 50
49 // Callback function used to get current network connection type. 51 // Callback function used to get current network connection type.
50 base::Callback<void(bool*)> cellular_callback_; 52 base::Callback<void(bool*)> cellular_callback_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(ProfilerMetricsProvider); 54 DISALLOW_COPY_AND_ASSIGN(ProfilerMetricsProvider);
53 }; 55 };
54 56
55 } // namespace metrics 57 } // namespace metrics
56 58
57 #endif // COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_ 59 #endif // COMPONENTS_METRICS_PROFILER_PROFILER_METRICS_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | components/metrics/profiler/profiler_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698