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

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

Issue 484603006: Add LOCAL_ prefix to non-UMA histogram macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 6 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 "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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (PluginMetricsProvider::IsPluginProcess(data.process_type)) 180 if (PluginMetricsProvider::IsPluginProcess(data.process_type))
181 return; 181 return;
182 #endif 182 #endif
183 183
184 IncrementPrefValue(prefs::kStabilityChildProcessCrashCount); 184 IncrementPrefValue(prefs::kStabilityChildProcessCrashCount);
185 } 185 }
186 186
187 void ChromeStabilityMetricsProvider::LogLoadStarted( 187 void ChromeStabilityMetricsProvider::LogLoadStarted(
188 content::WebContents* web_contents) { 188 content::WebContents* web_contents) {
189 content::RecordAction(base::UserMetricsAction("PageLoad")); 189 content::RecordAction(base::UserMetricsAction("PageLoad"));
190 HISTOGRAM_ENUMERATION("Chrome.UmaPageloadCounter", 1, 2); 190 // TODO(asvitkine): Check if this is used for anything and if not, remove.
191 LOCAL_HISTOGRAM_BOOLEAN("Chrome.UmaPageloadCounter", true);
191 IncrementPrefValue(prefs::kStabilityPageLoadCount); 192 IncrementPrefValue(prefs::kStabilityPageLoadCount);
192 IncrementLongPrefsValue(prefs::kUninstallMetricsPageLoadCount); 193 IncrementLongPrefsValue(prefs::kUninstallMetricsPageLoadCount);
193 // We need to save the prefs, as page load count is a critical stat, and it 194 // We need to save the prefs, as page load count is a critical stat, and it
194 // might be lost due to a crash :-(. 195 // might be lost due to a crash :-(.
195 } 196 }
196 197
197 void ChromeStabilityMetricsProvider::LogRendererCrash( 198 void ChromeStabilityMetricsProvider::LogRendererCrash(
198 content::RenderProcessHost* host, 199 content::RenderProcessHost* host,
199 base::TerminationStatus status, 200 base::TerminationStatus status,
200 int exit_code) { 201 int exit_code) {
(...skipping 24 matching lines...) Expand all
225 was_extension_process ? 2 : 1); 226 was_extension_process ? 2 : 1);
226 } else if (status == base::TERMINATION_STATUS_STILL_RUNNING) { 227 } else if (status == base::TERMINATION_STATUS_STILL_RUNNING) {
227 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive", 228 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive",
228 was_extension_process ? 2 : 1); 229 was_extension_process ? 2 : 1);
229 } 230 }
230 } 231 }
231 232
232 void ChromeStabilityMetricsProvider::LogRendererHang() { 233 void ChromeStabilityMetricsProvider::LogRendererHang() {
233 IncrementPrefValue(prefs::kStabilityRendererHangCount); 234 IncrementPrefValue(prefs::kStabilityRendererHangCount);
234 } 235 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend.cc ('k') | chrome/browser/net/evicted_domain_cookie_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698