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

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

Issue 1366643002: Extract guts of ChromeStabilityMetricsProvider into helper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 5 years, 3 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_stability_metrics_provider.h
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.h b/chrome/browser/metrics/chrome_stability_metrics_provider.h
index 5ac85476dbe04cf1fa9bbcdc0d9e10b8890a15c7..d9bd23ffeae519004352b8c64cfe89c335971ab6 100644
--- a/chrome/browser/metrics/chrome_stability_metrics_provider.h
+++ b/chrome/browser/metrics/chrome_stability_metrics_provider.h
@@ -10,17 +10,11 @@
#include "base/metrics/user_metrics.h"
#include "base/process/kill.h"
#include "components/metrics/metrics_provider.h"
+#include "components/metrics/stability_metrics_helper.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;
-}
-
class PrefService;
// ChromeStabilityMetricsProvider gathers and logs Chrome-specific stability-
@@ -40,9 +34,6 @@ class ChromeStabilityMetricsProvider
metrics::SystemProfileProto* system_profile_proto) override;
void ClearSavedStabilityMetrics() override;
- // Registers local state prefs used by this class.
- static void RegisterPrefs(PrefRegistrySimple* registry);
-
private:
FRIEND_TEST_ALL_PREFIXES(ChromeStabilityMetricsProviderTest,
BrowserChildProcessObserver);
@@ -59,25 +50,7 @@ class ChromeStabilityMetricsProvider
const content::ChildProcessData& data,
int exit_code) 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);
-
- // Records a renderer process crash.
- void LogRendererCrash(content::RenderProcessHost* host,
- base::TerminationStatus status,
- int exit_code);
-
- // Increment an Integer pref value specified by |path|.
- void IncrementPrefValue(const char* path);
-
- // Increment a 64-bit Integer pref value specified by |path|.
- void IncrementLongPrefsValue(const char* path);
-
- // Records a renderer process hang.
- void LogRendererHang();
-
- PrefService* local_state_;
+ metrics::StabilityMetricsHelper helper_;
// Registrar for receiving stability-related notifications.
content::NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698