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

Side by Side Diff: chromecast/browser/metrics/cast_stability_metrics_provider.cc

Issue 1320153002: Add new termination status for failed launch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 3 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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698