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

Unified Diff: net/base/sdch_manager.cc

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 | « net/base/mime_sniffer.cc ('k') | net/disk_cache/histogram_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager.cc
===================================================================
--- net/base/sdch_manager.cc (revision 33932)
+++ net/base/sdch_manager.cc (working copy)
@@ -32,10 +32,11 @@
// static
void SdchManager::SdchErrorRecovery(ProblemCodes problem) {
- static LinearHistogram histogram("Sdch3.ProblemCodes_4", MIN_PROBLEM_CODE,
- MAX_PROBLEM_CODE - 1, MAX_PROBLEM_CODE);
- histogram.SetFlags(kUmaTargetedHistogramFlag);
- histogram.Add(problem);
+ static scoped_refptr<Histogram> histogram =
+ LinearHistogram::LinearHistogramFactoryGet("Sdch3.ProblemCodes_4",
+ MIN_PROBLEM_CODE + 1, MAX_PROBLEM_CODE - 1, MAX_PROBLEM_CODE);
+ histogram->SetFlags(kUmaTargetedHistogramFlag);
+ histogram->Add(problem);
}
// static
« no previous file with comments | « net/base/mime_sniffer.cc ('k') | net/disk_cache/histogram_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698