| Index: components/metrics/metrics_service.h
|
| diff --git a/components/metrics/metrics_service.h b/components/metrics/metrics_service.h
|
| index 5a63352092993d40899195299874790609845cd9..e411f1bc018253bbea5c21d7d1bb5bfa134f73dd 100644
|
| --- a/components/metrics/metrics_service.h
|
| +++ b/components/metrics/metrics_service.h
|
| @@ -88,6 +88,16 @@ class SyntheticTrialObserver {
|
| virtual ~SyntheticTrialObserver() {}
|
| };
|
|
|
| +// Interface for observing whenever the MetricsService is started or stopped.
|
| +class MetricsServiceObserver {
|
| + public:
|
| + virtual void OnMetricsServiceStart() = 0;
|
| + virtual void OnMetricsServiceStop() = 0;
|
| +
|
| + protected:
|
| + virtual ~MetricsServiceObserver() {}
|
| +};
|
| +
|
| // See metrics_service.cc for a detailed description.
|
| class MetricsService : public base::HistogramFlattener {
|
| public:
|
| @@ -232,6 +242,11 @@ class MetricsService : public base::HistogramFlattener {
|
| // Removes an existing observer of synthetic trials list changes.
|
| void RemoveSyntheticTrialObserver(SyntheticTrialObserver* observer);
|
|
|
| + // Add / remove observers interested in watching the MetricsService start and
|
| + // stop events.
|
| + void AddObserver(MetricsServiceObserver* observer);
|
| + void RemoveObserver(MetricsServiceObserver* observer);
|
| +
|
| // Register the specified |provider| to provide additional metrics into the
|
| // UMA log. Should be called during MetricsService initialization only.
|
| void RegisterMetricsProvider(scoped_ptr<MetricsProvider> provider);
|
| @@ -486,6 +501,10 @@ class MetricsService : public base::HistogramFlattener {
|
| // List of observers of |synthetic_trial_groups_| changes.
|
| base::ObserverList<SyntheticTrialObserver> synthetic_trial_observer_list_;
|
|
|
| + // List of observers interested in watching the MetricsService start and stop
|
| + // events.
|
| + base::ObserverList<MetricsServiceObserver> metrics_service_observer_list_;
|
| +
|
| // Execution phase the browser is in.
|
| static ExecutionPhase execution_phase_;
|
|
|
|
|