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

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

Issue 10078017: Added asynchronous notification of readiness to the StatisticsProvider, and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 8 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/chromeos/system/statistics_provider.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
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index 229921de4fbdfaf848b283a4bde64ce88dd34495..131ad85363ab35e2d8cdeaf1b448bf4ab5a61851 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -152,10 +152,17 @@ class MetricsService : public content::NotificationObserver,
NEED_TO_SHUTDOWN = ~CLEANLY_SHUTDOWN
};
- // First part of the init task. Called on the FILE thread to load hardware
- // class information.
- static void InitTaskGetHardwareClass(base::WeakPtr<MetricsService> self,
- base::MessageLoopProxy* target_loop);
+ // First part of the init task. Starts retrieving the hardware class and
+ // proceeds to OnInitTaskGotHardwareClass() or waits for
+ // OnStatisticsProviderReady().
+ static void InitTaskGetHardwareClass(base::WeakPtr<MetricsService> self);
+
+#if defined(OS_CHROMEOS)
+ // Callback for the StatisticsProvider to signal that hardware data has been
+ // loaded. Retrieves the hardware class and passes it to
+ // OnInitTaskGotHardwareClass().
+ void OnStatisticsProviderReady();
jar (doing other things) 2012/04/20 00:37:39 Rather than conditionally defining a method... and
Joao da Silva 2012/04/20 11:53:35 Good points; I thought it was acceptable in this c
+#endif
// Callback from InitTaskGetHardwareClass() that continues the init task by
// loading plugin information.
« no previous file with comments | « chrome/browser/chromeos/system/statistics_provider.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698