| Index: chrome/browser/metrics/chrome_metrics_service_client.h
|
| diff --git a/chrome/browser/metrics/chrome_metrics_service_client.h b/chrome/browser/metrics/chrome_metrics_service_client.h
|
| index edf6be3e6715c0183ae40617b0b492a762ecfa83..897b524d32f51be0a4429a50b51954793e872879 100644
|
| --- a/chrome/browser/metrics/chrome_metrics_service_client.h
|
| +++ b/chrome/browser/metrics/chrome_metrics_service_client.h
|
| @@ -13,12 +13,15 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "chrome/browser/metrics/network_stats_uploader.h"
|
| +#include "chrome/browser/metrics/tracking_synchronizer_observer.h"
|
| #include "components/metrics/metrics_service_client.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
|
|
| class ChromeOSMetricsProvider;
|
| +class GoogleUpdateMetricsProviderWin;
|
| class MetricsService;
|
| +class PluginMetricsProvider;
|
|
|
| namespace metrics {
|
| class MetricsStateManager;
|
| @@ -26,8 +29,10 @@ class MetricsStateManager;
|
|
|
| // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient
|
| // that depends on chrome/.
|
| -class ChromeMetricsServiceClient : public metrics::MetricsServiceClient,
|
| - public content::NotificationObserver {
|
| +class ChromeMetricsServiceClient
|
| + : public metrics::MetricsServiceClient,
|
| + public chrome_browser_metrics::TrackingSynchronizerObserver,
|
| + public content::NotificationObserver {
|
| public:
|
| virtual ~ChromeMetricsServiceClient();
|
|
|
| @@ -50,15 +55,35 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient,
|
|
|
| MetricsService* metrics_service() { return metrics_service_.get(); }
|
|
|
| + PluginMetricsProvider* plugin_metrics_provider() {
|
| + return plugin_metrics_provider_;
|
| + }
|
| +
|
| private:
|
| explicit ChromeMetricsServiceClient(
|
| metrics::MetricsStateManager* state_manager);
|
|
|
| + // TrackingSynchronizerObserver:
|
| + virtual void ReceivedProfilerData(
|
| + const tracked_objects::ProcessDataSnapshot& process_data,
|
| + int process_type) OVERRIDE;
|
| + virtual void FinishedReceivingProfilerData() OVERRIDE;
|
| +
|
| // First part of the init task. Called on the FILE thread to load hardware
|
| - // class information. When this task is complete, |done_callback| is run on
|
| - // |target_loop|.
|
| - void InitTaskGetHardwareClass(base::MessageLoopProxy* target_loop,
|
| - const base::Closure& done_callback);
|
| + // class information. When this task is complete,
|
| + // |OnInitTaskGotHardwareClass()| is run on |target_loop|.
|
| + void InitTaskGetHardwareClass(base::MessageLoopProxy* target_loop);
|
| +
|
| + // Callback that continues the init task by loading plugin information.
|
| + void OnInitTaskGotHardwareClass();
|
| +
|
| + // Called after the Plugin init task has been completed that continues the
|
| + // init task by launching a task to gather Google Update statistics.
|
| + void OnInitTaskGotPluginInfo();
|
| +
|
| + // Called after GoogleUpdate init task has been completed that continues the
|
| + // init task by loading profiler data.
|
| + void OnInitTaskGotGoogleUpdateData();
|
|
|
| // Callbacks for various stages of final log info collection. Do not call
|
| // these directly.
|
| @@ -107,6 +132,15 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient,
|
| // Number of async histogram fetch requests in progress.
|
| int num_async_histogram_fetches_in_progress_;
|
|
|
| + PluginMetricsProvider* plugin_metrics_provider_;
|
| +
|
| +#if defined(OS_WIN)
|
| + GoogleUpdateMetricsProviderWin* google_update_metrics_provider_;
|
| +#endif
|
| +
|
| + // Callback that is called when initial metrics gathering is complete.
|
| + base::Closure finished_gathering_initial_metrics_callback_;
|
| +
|
| base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
|
|
|