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

Unified Diff: chrome/browser/metrics/metrics_service.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 | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.h
===================================================================
--- chrome/browser/metrics/metrics_service.h (revision 271641)
+++ chrome/browser/metrics/metrics_service.h (working copy)
@@ -15,6 +15,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/user_metrics.h"
@@ -26,6 +27,7 @@
#include "chrome/browser/metrics/tracking_synchronizer_observer.h"
#include "chrome/common/metrics/metrics_service_base.h"
#include "chrome/installer/util/google_update_settings.h"
+#include "components/metrics/metrics_provider.h"
#include "components/metrics/metrics_service_observer.h"
#include "components/variations/active_field_trials.h"
#include "content/public/browser/browser_child_process_observer.h"
@@ -277,6 +279,10 @@
// To use this method, SyntheticTrialGroup should friend your class.
void RegisterSyntheticFieldTrial(const SyntheticTrialGroup& trial_group);
+ // Register the specified |provider| to provide additional metrics into the
+ // UMA log. Should be called during MetricsService initialization only.
+ void RegisterMetricsProvider(scoped_ptr<metrics::MetricsProvider> provider);
+
// Check if this install was cloned or imaged from another machine. If a
// clone is detected, reset the client id and low entropy source. This
// should not be called more than once.
@@ -483,6 +489,9 @@
// low entropy source and whether metrics reporting is enabled. Weak pointer.
metrics::MetricsStateManager* state_manager_;
+ // Registered metrics providers.
+ ScopedVector<metrics::MetricsProvider> metrics_providers_;
+
base::ActionCallback action_callback_;
content::NotificationRegistrar registrar_;
« no previous file with comments | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698