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 aba5945f94288f5209cc6252cbdc55690fc15a86..730f2604595d5bc21bd7221d90b98f73848126b5 100644 |
--- a/chrome/browser/metrics/chrome_metrics_service_client.h |
+++ b/chrome/browser/metrics/chrome_metrics_service_client.h |
@@ -9,16 +9,22 @@ |
#include "base/basictypes.h" |
#include "base/callback.h" |
+#include "base/files/file_path.h" |
Ilya Sherman
2014/06/02 21:52:37
nit: Can this be forward-declared?
blundell
2014/06/06 13:06:29
Done.
|
#include "base/memory/scoped_ptr.h" |
#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; |
+class PrefRegistrySimple; |
+class ProfilerMetricsProvider; |
namespace metrics { |
class MetricsStateManager; |
@@ -26,8 +32,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, |
Ilya Sherman
2014/06/02 21:52:37
nit: Hmm, I am really not fond of "chrome_browser_
blundell
2014/06/06 13:06:29
I'd rather leave this for a separate CL to reduce
|
+ public content::NotificationObserver { |
public: |
virtual ~ChromeMetricsServiceClient(); |
@@ -36,6 +44,10 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient, |
metrics::MetricsStateManager* state_manager, |
PrefService* local_state); |
+ // At startup, prefs needs to be called with a list of all the pref names and |
+ // types we'll be using. |
Ilya Sherman
2014/06/02 21:52:37
nit: This doc string is really confusingly worded.
blundell
2014/06/06 13:06:29
Done.
|
+ static void RegisterPrefs(PrefRegistrySimple* registry); |
+ |
// metrics::MetricsServiceClient: |
virtual void SetClientID(const std::string& client_id) OVERRIDE; |
virtual bool IsOffTheRecordSessionActive() OVERRIDE; |
@@ -55,13 +67,32 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient, |
MetricsService* metrics_service() { return metrics_service_.get(); } |
+ void LogPluginLoadingError(const base::FilePath& plugin_path); |
+ |
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; |
+ |
// Completes the two-phase initialization of ChromeMetricsServiceClient. |
void Initialize(); |
+ // 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. |
void OnMemoryDetailCollectionDone(); |
@@ -112,6 +143,19 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient, |
// Number of async histogram fetch requests in progress. |
int num_async_histogram_fetches_in_progress_; |
+ ProfilerMetricsProvider* profiler_metrics_provider_; |
Ilya Sherman
2014/06/02 21:52:37
nit: Please add some documentation, including abou
blundell
2014/06/06 13:06:29
Done.
|
+ |
+#if defined(ENABLE_PLUGINS) |
+ PluginMetricsProvider* plugin_metrics_provider_; |
+#endif |
+ |
+#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); |