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

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, 12 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/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 69359)
+++ 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,20 @@
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;
+ HandleIdleSinceLastTransmission(false);
petkov 2011/01/06 18:50:36 what does this do?
kmixter1 2011/01/14 00:07:02 Fair question - see new comment.
+}
+#endif // OS_CHROMEOS
+
void MetricsService::LogChildProcessChange(
NotificationType type,
const NotificationSource& source,
« chrome/browser/metrics/metrics_service.h ('K') | « chrome/browser/metrics/metrics_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698