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

Side by Side Diff: chrome/browser/metrics/chrome_stability_metrics_provider.cc

Issue 1067733006: Add extra parameter to BrowserChildProcessCrashed to pass the exit_code at time of crash/termination (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review comments Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_stability_metrics_provider.h ('k') | chrome/browser/metrics/plugin_metrics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698