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

Side by Side Diff: components/metrics/metrics_provider.h

Issue 1537743006: Persist setup metrics and have Chrome report them during UMA upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: address (many) comments by Greg Created 4 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
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_METRICS_PROVIDER_H_ 5 #ifndef COMPONENTS_METRICS_METRICS_PROVIDER_H_
6 #define COMPONENTS_METRICS_METRICS_PROVIDER_H_ 6 #define COMPONENTS_METRICS_METRICS_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace base {
11
grt (UTC plus 2) 2016/02/08 18:09:19 nit: omit empty lines for a single forward decl li
bcwhite 2016/02/09 21:08:46 Done.
12 class HistogramSnapshotManager;
13
14 } // namespace base
15
10 namespace metrics { 16 namespace metrics {
11 17
12 class ChromeUserMetricsExtension; 18 class ChromeUserMetricsExtension;
13 class SystemProfileProto; 19 class SystemProfileProto;
14 class SystemProfileProto_Stability; 20 class SystemProfileProto_Stability;
15 21
16 // MetricsProvider is an interface allowing different parts of the UMA protos to 22 // MetricsProvider is an interface allowing different parts of the UMA protos to
17 // be filled out by different classes. 23 // be filled out by different classes.
18 class MetricsProvider { 24 class MetricsProvider {
19 public: 25 public:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Called to indicate that saved stability prefs should be cleared, e.g. 62 // Called to indicate that saved stability prefs should be cleared, e.g.
57 // because they are from an old version and should not be kept. 63 // because they are from an old version and should not be kept.
58 virtual void ClearSavedStabilityMetrics(); 64 virtual void ClearSavedStabilityMetrics();
59 65
60 // Provides general metrics that are neither system profile nor stability 66 // Provides general metrics that are neither system profile nor stability
61 // metrics. May also be used to add histograms when final metrics are 67 // metrics. May also be used to add histograms when final metrics are
62 // collected right before upload. 68 // collected right before upload.
63 virtual void ProvideGeneralMetrics( 69 virtual void ProvideGeneralMetrics(
64 ChromeUserMetricsExtension* uma_proto); 70 ChromeUserMetricsExtension* uma_proto);
65 71
72 // Called during collection to explicitly load histogram snapshots using a
73 // snapshot manager. PrepareDeltas() will have been already called and
grt (UTC plus 2) 2016/02/08 18:09:19 nit "will have already been called"
bcwhite 2016/02/09 21:08:46 Done.
74 // FinishDeltas() will be called later; calls to only PrepareDelta(), not
75 // PrepareDeltas (plural), should be made.
76 virtual void RecordHistogramSnapshots(base::HistogramSnapshotManager* hsm);
77
66 private: 78 private:
67 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); 79 DISALLOW_COPY_AND_ASSIGN(MetricsProvider);
68 }; 80 };
69 81
70 } // namespace metrics 82 } // namespace metrics
71 83
72 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ 84 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698