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

Unified Diff: chrome/browser/metrics/metrics_log.h

Issue 296483004: Introduce a MetricsDataProvider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_log.h
===================================================================
--- chrome/browser/metrics/metrics_log.h (revision 271641)
+++ chrome/browser/metrics/metrics_log.h (working copy)
@@ -37,6 +37,10 @@
struct WebPluginInfo;
}
+namespace metrics {
+class MetricsProvider;
+}
+
namespace tracked_objects {
struct ProcessDataSnapshot;
}
@@ -82,13 +86,15 @@
static void set_version_extension(const std::string& extension);
static const std::string& version_extension();
- // Records the current operating environment. Takes the list of installed
+ // Records the current operating environment, including metrics provided by
+ // the specified set of |metrics_providers|. Takes the list of installed
// plugins, Google Update statistics, and synthetic trial IDs as parameters
// because those can't be obtained synchronously from the UI thread.
// A synthetic trial is one that is set up dynamically by code in Chrome. For
// example, a pref may be mapped to a synthetic trial such that the group
// is determined by the pref value.
void RecordEnvironment(
+ const std::vector<metrics::MetricsProvider*>& metrics_providers,
const std::vector<content::WebPluginInfo>& plugin_list,
const GoogleUpdateMetrics& google_update_metrics,
const std::vector<variations::ActiveGroupId>& synthetic_trials);
@@ -108,17 +114,24 @@
const tracked_objects::ProcessDataSnapshot& process_data,
int process_type);
- // Writes application stability metrics (as part of the profile log). The
- // system profile portion of the log must have already been filled in by a
- // call to RecordEnvironment() or LoadSavedEnvironmentFromPrefs().
+ // Writes application stability metrics, including stability metrics provided
+ // by the specified set of |metrics_providers|. The system profile portion of
+ // the log must have already been filled in by a call to RecordEnvironment()
+ // or LoadSavedEnvironmentFromPrefs().
// NOTE: Has the side-effect of clearing the stability prefs..
//
// If this log is of type INITIAL_STABILITY_LOG, records additional info such
// as number of incomplete shutdowns as well as extra breakpad and debugger
// stats.
- void RecordStabilityMetrics(base::TimeDelta incremental_uptime,
- base::TimeDelta uptime);
+ void RecordStabilityMetrics(
+ const std::vector<metrics::MetricsProvider*>& metrics_providers,
+ base::TimeDelta incremental_uptime,
+ base::TimeDelta uptime);
+ // Records general metrics based on the specified |metrics_providers|.
+ void RecordGeneralMetrics(
+ const std::vector<metrics::MetricsProvider*>& metrics_providers);
+
const base::TimeTicks& creation_time() const {
return creation_time_;
}
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698