Chromium Code Reviews| 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); |
|
jar (doing other things)
2011/01/14 02:31:47
Is this all on the UI thread?
kmixter1
2011/01/15 22:21:07
In external_metrics I only call this when on the U
|
| + 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, |