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

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

Issue 9702015: [UMA] Add performance profile data to UMA uploads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix BASE_EXPORT usage 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/metrics/metrics_log_unittest.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..cfe194359bad97e8d4e42b12b333f9b86a629ffe 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -15,15 +15,14 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
-#include "base/memory/weak_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/process_util.h"
+#include "chrome/browser/metrics/tracking_synchronizer_observer.h"
#include "chrome/common/metrics/metrics_service_base.h"
-#include "content/public/common/process_type.h"
-#include "content/public/common/url_fetcher_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/common/url_fetcher_delegate.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/external_metrics.h"
@@ -31,6 +30,7 @@
class BookmarkModel;
class BookmarkNode;
+class MetricsLog;
class MetricsReportingScheduler;
class PrefService;
class Profile;
@@ -53,14 +53,19 @@ namespace prerender {
bool IsOmniboxEnabled(Profile* profile);
}
+namespace tracked_objects {
+struct ProcessDataSnapshot;
+}
+
namespace webkit {
struct WebPluginInfo;
}
-
-class MetricsService : public content::NotificationObserver,
- public content::URLFetcherDelegate,
- public MetricsServiceBase {
+class MetricsService
+ : public chrome_browser_metrics::TrackingSynchronizerObserver,
+ public content::NotificationObserver,
+ public content::URLFetcherDelegate,
+ public MetricsServiceBase {
public:
MetricsService();
virtual ~MetricsService();
@@ -161,11 +166,18 @@ class MetricsService : public content::NotificationObserver,
// loading plugin information.
void OnInitTaskGotHardwareClass(const std::string& hardware_class);
- // Callback from PluginService::GetPlugins() that moves the state to
- // INIT_TASK_DONE.
+ // Callback from PluginService::GetPlugins() that continues the init task by
+ // loading profiler data.
void OnInitTaskGotPluginInfo(
const std::vector<webkit::WebPluginInfo>& plugins);
+ // TrackingSynchronizerObserver:
+ virtual void ReceivedProfilerData(
+ const tracked_objects::ProcessDataSnapshot& process_data,
+ content::ProcessType process_type) OVERRIDE;
+ // Callback that moves the state to INIT_TASK_DONE.
+ virtual void FinishedReceivingProfilerData() OVERRIDE;
+
// When we start a new version of Chromium (different from our last run), we
// need to discard the old crash stats so that we don't attribute crashes etc.
// in the old version to the current version (via current logs).
@@ -347,6 +359,9 @@ class MetricsService : public content::NotificationObserver,
// The list of plugins which was retrieved on the file thread.
std::vector<webkit::WebPluginInfo> plugins_;
+ // The initial log, used to record startup metrics.
+ scoped_ptr<MetricsLog> initial_log_;
+
// The outstanding transmission appears as a URL Fetch operation.
scoped_ptr<content::URLFetcher> current_fetch_xml_;
scoped_ptr<content::URLFetcher> current_fetch_proto_;
« no previous file with comments | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698