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

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

Issue 299153004: Move child process observing from MetricsService to stability provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_stability_metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/chrome_stability_metrics_provider.h
===================================================================
--- chrome/browser/metrics/chrome_stability_metrics_provider.h (revision 272600)
+++ chrome/browser/metrics/chrome_stability_metrics_provider.h (working copy)
@@ -9,9 +9,12 @@
#include "base/metrics/user_metrics.h"
#include "base/process/kill.h"
#include "components/metrics/metrics_provider.h"
+#include "content/public/browser/browser_child_process_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+class PrefRegistrySimple;
+
namespace content {
class RenderProcessHost;
class WebContents;
@@ -19,8 +22,10 @@
// ChromeStabilityMetricsProvider gathers and logs Chrome-specific stability-
// related metrics.
-class ChromeStabilityMetricsProvider : public metrics::MetricsProvider,
- public content::NotificationObserver {
+class ChromeStabilityMetricsProvider
+ : public metrics::MetricsProvider,
+ public content::BrowserChildProcessObserver,
+ public content::NotificationObserver {
public:
ChromeStabilityMetricsProvider();
virtual ~ChromeStabilityMetricsProvider();
@@ -31,12 +36,19 @@
virtual void ProvideStabilityMetrics(
metrics::SystemProfileProto* system_profile_proto) OVERRIDE;
+ // Registers local state prefs used by this class.
+ static void RegisterPrefs(PrefRegistrySimple* registry);
+
private:
// content::NotificationObserver:
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // content::BrowserChildProcessObserver:
+ virtual void BrowserChildProcessCrashed(
+ const content::ChildProcessData& data) OVERRIDE;
+
// Logs the initiation of a page load and uses |web_contents| to do
// additional logging of the type of page loaded.
void LogLoadStarted(content::WebContents* web_contents);
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_stability_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698