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

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

Issue 6077013: Add support for collecting non-Chrome crash stats in Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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') | chrome/common/pref_names.h » ('j') | 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 71358)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -400,6 +400,12 @@
0);
local_state->RegisterIntegerPref(prefs::kStabilityDebuggerPresent, 0);
local_state->RegisterIntegerPref(prefs::kStabilityDebuggerNotPresent, 0);
+#if defined(OS_CHROMEOS)
+ local_state->RegisterIntegerPref(prefs::kStabilityOtherUserCrashCount, 0);
+ local_state->RegisterIntegerPref(prefs::kStabilityKernelCrashCount, 0);
+ local_state->RegisterIntegerPref(prefs::kStabilitySystemUncleanShutdownCount,
+ 0);
+#endif // OS_CHROMEOS
local_state->RegisterDictionaryPref(prefs::kProfileMetrics);
local_state->RegisterIntegerPref(prefs::kNumBookmarksOnBookmarkBar, 0);
@@ -1715,6 +1721,22 @@
IncrementPrefValue(prefs::kStabilityRendererHangCount);
}
+#if defined(OS_CHROMEOS)
+void MetricsService::LogChromeOSCrash(const std::string &crash_type) {
+ if (crash_type == "user")
+ IncrementPrefValue(prefs::kStabilityOtherUserCrashCount);
+ else if (crash_type == "kernel")
+ IncrementPrefValue(prefs::kStabilityKernelCrashCount);
+ else if (crash_type == "uncleanshutdown")
+ IncrementPrefValue(prefs::kStabilitySystemUncleanShutdownCount);
+ else
+ NOTREACHED() << "Unexpected Chrome OS crash type " << crash_type;
+ // Wake up metrics logs sending if necessary now that new
+ // log data is available.
+ HandleIdleSinceLastTransmission(false);
+}
+#endif // OS_CHROMEOS
+
void MetricsService::LogChildProcessChange(
NotificationType type,
const NotificationSource& source,
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698