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 "chrome/browser/metrics/chrome_stability_metrics_provider.h" | 5 #include "chrome/browser/metrics/chrome_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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 LogRendererHang(); | 229 LogRendererHang(); |
230 break; | 230 break; |
231 | 231 |
232 default: | 232 default: |
233 NOTREACHED(); | 233 NOTREACHED(); |
234 break; | 234 break; |
235 } | 235 } |
236 } | 236 } |
237 | 237 |
238 void ChromeStabilityMetricsProvider::BrowserChildProcessCrashed( | 238 void ChromeStabilityMetricsProvider::BrowserChildProcessCrashed( |
239 const content::ChildProcessData& data) { | 239 const content::ChildProcessData& data, |
| 240 int exit_code) { |
240 #if defined(ENABLE_PLUGINS) | 241 #if defined(ENABLE_PLUGINS) |
241 // Exclude plugin crashes from the count below because we report them via | 242 // Exclude plugin crashes from the count below because we report them via |
242 // a separate UMA metric. | 243 // a separate UMA metric. |
243 if (PluginMetricsProvider::IsPluginProcess(data.process_type)) | 244 if (PluginMetricsProvider::IsPluginProcess(data.process_type)) |
244 return; | 245 return; |
245 #endif | 246 #endif |
246 | 247 |
247 IncrementPrefValue(prefs::kStabilityChildProcessCrashCount); | 248 IncrementPrefValue(prefs::kStabilityChildProcessCrashCount); |
248 } | 249 } |
249 | 250 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 was_extension_process ? 2 : 1); | 290 was_extension_process ? 2 : 1); |
290 } else if (status == base::TERMINATION_STATUS_STILL_RUNNING) { | 291 } else if (status == base::TERMINATION_STATUS_STILL_RUNNING) { |
291 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive", | 292 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive", |
292 was_extension_process ? 2 : 1); | 293 was_extension_process ? 2 : 1); |
293 } | 294 } |
294 } | 295 } |
295 | 296 |
296 void ChromeStabilityMetricsProvider::LogRendererHang() { | 297 void ChromeStabilityMetricsProvider::LogRendererHang() { |
297 IncrementPrefValue(prefs::kStabilityRendererHangCount); | 298 IncrementPrefValue(prefs::kStabilityRendererHangCount); |
298 } | 299 } |
OLD | NEW |