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

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

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 | « chrome/browser/metrics/metrics_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 272600)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -200,9 +200,6 @@
#include "components/metrics/metrics_reporting_scheduler.h"
#include "components/metrics/metrics_service_client.h"
#include "components/variations/entropy_provider.h"
-#include "content/public/browser/child_process_data.h"
-#include "content/public/browser/render_process_host.h"
-#include "content/public/browser/user_metrics.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_fetcher.h"
@@ -334,12 +331,6 @@
registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0);
registry->RegisterIntegerPref(prefs::kStabilityCrashCount, 0);
registry->RegisterIntegerPref(prefs::kStabilityIncompleteSessionEndCount, 0);
- registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0);
- registry->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
- registry->RegisterIntegerPref(prefs::kStabilityExtensionRendererCrashCount,
- 0);
- registry->RegisterIntegerPref(prefs::kStabilityRendererHangCount, 0);
- registry->RegisterIntegerPref(prefs::kStabilityChildProcessCrashCount, 0);
registry->RegisterIntegerPref(prefs::kStabilityBreakpadRegistrationFail, 0);
registry->RegisterIntegerPref(prefs::kStabilityBreakpadRegistrationSuccess,
0);
@@ -360,12 +351,14 @@
registry->RegisterListPref(metrics::prefs::kMetricsOngoingLogs);
registry->RegisterInt64Pref(prefs::kInstallDate, 0);
- registry->RegisterInt64Pref(prefs::kUninstallMetricsPageLoadCount, 0);
registry->RegisterInt64Pref(prefs::kUninstallLaunchCount, 0);
registry->RegisterInt64Pref(prefs::kUninstallMetricsUptimeSec, 0);
registry->RegisterInt64Pref(prefs::kUninstallLastLaunchTimeSec, 0);
registry->RegisterInt64Pref(prefs::kUninstallLastObservedRunTimeSec, 0);
+ // TODO(asvitkine): Move this out of here.
+ ChromeStabilityMetricsProvider::RegisterPrefs(registry);
+
#if defined(OS_ANDROID)
// TODO(asvitkine): Move this out of here.
AndroidMetricsProvider::RegisterPrefs(registry);
@@ -428,14 +421,10 @@
RegisterMetricsProvider(scoped_ptr<metrics::MetricsProvider>(
plugin_metrics_provider_));
#endif
-
- BrowserChildProcessObserver::Add(this);
}
MetricsService::~MetricsService() {
DisableRecording();
-
- BrowserChildProcessObserver::Remove(this);
}
void MetricsService::InitializeMetricsRecordingState() {
@@ -563,19 +552,6 @@
std::abs(amount));
}
-void MetricsService::BrowserChildProcessCrashed(
- const content::ChildProcessData& data) {
- // TODO(asvitkine): Move this into ChromeStabilityStatsProvider.
-#if defined(ENABLE_PLUGINS)
- // Exclude plugin crashes from the count below because we report them via
- // a separate UMA metric.
- if (PluginMetricsProvider::IsPluginProcess(data.process_type))
- return;
-#endif
-
- IncrementPrefValue(prefs::kStabilityChildProcessCrashCount);
-}
-
void MetricsService::HandleIdleSinceLastTransmission(bool in_idle) {
// If there wasn't a lot of action, maybe the computer was asleep, in which
// case, the log transmissions should have stopped. Here we start them up
@@ -1473,4 +1449,3 @@
plugin_metrics_provider_->RecordPluginChanges();
#endif
}
-
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698