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

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

Issue 2918533003: Send metrics with embedded system profiles after system startup. (Closed)
Patch Set: addressed final review comments Created 3 years, 6 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 | « components/metrics/metrics_log_store.cc ('k') | components/metrics/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_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 { 10 namespace base {
(...skipping 24 matching lines...) Expand all
35 // Called when metrics recording has been disabled. 35 // Called when metrics recording has been disabled.
36 virtual void OnRecordingDisabled(); 36 virtual void OnRecordingDisabled();
37 37
38 // Called when the application is going into background mode, on platforms 38 // Called when the application is going into background mode, on platforms
39 // where applications may be killed when going into the background (Android, 39 // where applications may be killed when going into the background (Android,
40 // iOS). Providers that buffer histogram data in memory should persist 40 // iOS). Providers that buffer histogram data in memory should persist
41 // histograms in this callback, as the application may be killed without 41 // histograms in this callback, as the application may be killed without
42 // further notification after this callback. 42 // further notification after this callback.
43 virtual void OnAppEnterBackground(); 43 virtual void OnAppEnterBackground();
44 44
45 // Provides a complete and independent system profile + metrics for uploading.
46 // Any histograms added to the |snapshot_manager| will also be included. A
47 // return of false indicates there are none. Will be called repeatedly until
48 // there is nothing else.
49 virtual bool ProvideIndependentMetrics(
50 SystemProfileProto* system_profile_proto,
51 base::HistogramSnapshotManager* snapshot_manager);
52
45 // Provides additional metrics into the system profile. 53 // Provides additional metrics into the system profile.
46 virtual void ProvideSystemProfileMetrics( 54 virtual void ProvideSystemProfileMetrics(
47 SystemProfileProto* system_profile_proto); 55 SystemProfileProto* system_profile_proto);
48 56
49 // Called once at startup to see whether this provider has critical stability 57 // Called once at startup to see whether this provider has critical stability
50 // events to share in an initial stability log. 58 // events to share in an initial stability log.
51 // Returning true can trigger ProvideInitialStabilityMetrics and 59 // Returning true can trigger ProvideInitialStabilityMetrics and
52 // ProvideStabilityMetrics on all other registered metrics providers. 60 // ProvideStabilityMetrics on all other registered metrics providers.
53 // Default implementation always returns false. 61 // Default implementation always returns false.
54 virtual bool HasInitialStabilityMetrics(); 62 virtual bool HasInitialStabilityMetrics();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void RecordInitialHistogramSnapshots( 98 virtual void RecordInitialHistogramSnapshots(
91 base::HistogramSnapshotManager* snapshot_manager); 99 base::HistogramSnapshotManager* snapshot_manager);
92 100
93 private: 101 private:
94 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); 102 DISALLOW_COPY_AND_ASSIGN(MetricsProvider);
95 }; 103 };
96 104
97 } // namespace metrics 105 } // namespace metrics
98 106
99 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ 107 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/metrics/metrics_log_store.cc ('k') | components/metrics/metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698