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

Unified Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 462027: Use factory to create histograms, and refcounts to track lifetimes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop.cc ('k') | chrome/browser/diagnostics/sqlite_diagnostics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_application_mac.mm
===================================================================
--- chrome/browser/chrome_browser_application_mac.mm (revision 33932)
+++ chrome/browser/chrome_browser_application_mac.mm (working copy)
@@ -91,10 +91,11 @@
}
void RecordExceptionWithUma(NSException* exception) {
- static LinearHistogram histogram("OSX.NSException", 0, kUnknownNSException,
- kUnknownNSException + 1);
- histogram.SetFlags(kUmaTargetedHistogramFlag);
- histogram.Add(BinForException(exception));
+ static scoped_refptr<Histogram> histogram =
+ LinearHistogram::LinearHistogramFactoryGet("OSX.NSException",
+ 0, kUnknownNSException, kUnknownNSException + 1);
+ histogram->SetFlags(kUmaTargetedHistogramFlag);
+ histogram->Add(BinForException(exception));
}
void Terminate() {
« no previous file with comments | « base/message_loop.cc ('k') | chrome/browser/diagnostics/sqlite_diagnostics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698