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

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

Issue 301633006: Move ChromeOS hardware class init out of MetricsService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix + response to review 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
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 1a33510f0bfba470437672bf14ac9dfc3054faac..edf6be3e6715c0183ae40617b0b492a762ecfa83 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.h
+++ b/chrome/browser/metrics/chrome_metrics_service_client.h
@@ -17,6 +17,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+class ChromeOSMetricsProvider;
class MetricsService;
namespace metrics {
@@ -53,6 +54,12 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient,
explicit ChromeMetricsServiceClient(
metrics::MetricsStateManager* state_manager);
+ // 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);
+
// Callbacks for various stages of final log info collection. Do not call
// these directly.
void OnMemoryDetailCollectionDone();
@@ -85,6 +92,10 @@ class ChromeMetricsServiceClient : public metrics::MetricsServiceClient,
content::NotificationRegistrar registrar_;
+ // On ChromeOS, holds a weak pointer to the ChromeOSMetricsProvider instance
+ // that has been registered with MetricsService. On other platforms, is NULL.
+ ChromeOSMetricsProvider* chromeos_metrics_provider_;
+
NetworkStatsUploader network_stats_uploader_;
// Saved callback received from CollectFinalMetrics().

Powered by Google App Engine
This is Rietveld 408576698