OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromecast/browser/metrics/cast_stability_metrics_provider.h" | 5 #include "chromecast/browser/metrics/cast_stability_metrics_provider.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const content::ChildProcessData& data, | 143 const content::ChildProcessData& data, |
144 int exit_code) { | 144 int exit_code) { |
145 IncrementPrefValue(prefs::kStabilityChildProcessCrashCount); | 145 IncrementPrefValue(prefs::kStabilityChildProcessCrashCount); |
146 } | 146 } |
147 | 147 |
148 void CastStabilityMetricsProvider::LogRendererCrash( | 148 void CastStabilityMetricsProvider::LogRendererCrash( |
149 content::RenderProcessHost* host, | 149 content::RenderProcessHost* host, |
150 base::TerminationStatus status, | 150 base::TerminationStatus status, |
151 int exit_code) { | 151 int exit_code) { |
152 if (status == base::TERMINATION_STATUS_PROCESS_CRASHED || | 152 if (status == base::TERMINATION_STATUS_PROCESS_CRASHED || |
153 status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION) { | 153 status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || |
| 154 status == base::TERMINATION_STATUS_LAUNCH_FAILED) { |
154 IncrementPrefValue(prefs::kStabilityRendererCrashCount); | 155 IncrementPrefValue(prefs::kStabilityRendererCrashCount); |
155 | 156 |
156 UMA_HISTOGRAM_SPARSE_SLOWLY("CrashExitCodes.Renderer", | 157 UMA_HISTOGRAM_SPARSE_SLOWLY("CrashExitCodes.Renderer", |
157 MapCrashExitCodeForHistogram(exit_code)); | 158 MapCrashExitCodeForHistogram(exit_code)); |
158 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildCrashes", 1); | 159 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildCrashes", 1); |
159 } else if (status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) { | 160 } else if (status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) { |
160 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildKills", 1); | 161 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildKills", 1); |
161 } else if (status == base::TERMINATION_STATUS_STILL_RUNNING) { | 162 } else if (status == base::TERMINATION_STATUS_STILL_RUNNING) { |
162 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive", 1); | 163 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive", 1); |
163 } | 164 } |
164 } | 165 } |
165 | 166 |
166 void CastStabilityMetricsProvider::LogRendererHang() { | 167 void CastStabilityMetricsProvider::LogRendererHang() { |
167 IncrementPrefValue(prefs::kStabilityRendererHangCount); | 168 IncrementPrefValue(prefs::kStabilityRendererHangCount); |
168 } | 169 } |
169 | 170 |
170 } // namespace metrics | 171 } // namespace metrics |
171 } // namespace chromecast | 172 } // namespace chromecast |
OLD | NEW |