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

Unified Diff: chrome/renderer/render_thread.cc

Issue 515033: Cleanup histogram classes mixing SetFlags into FactoryGet arguments... (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 | « chrome/browser/sync/profile_sync_service.cc ('k') | net/base/connection_type_histograms.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_thread.cc
===================================================================
--- chrome/renderer/render_thread.cc (revision 35277)
+++ chrome/renderer/render_thread.cc (working copy)
@@ -505,13 +505,11 @@
const char *name, int min, int max, size_t buckets) {
if (min <= 0)
min = 1;
- scoped_refptr<Histogram> histogram =
- Histogram::HistogramFactoryGet(name, min, max, buckets);
- // We verify this was not being destructed by setting a novel "PlannedLeak"
- // flag and watching out for the flag in the destructor.
- histogram->SetFlags(kUmaTargetedHistogramFlag | kPlannedLeakFlag);
+ scoped_refptr<Histogram> histogram = Histogram::FactoryGet(
+ name, min, max, buckets, Histogram::kUmaTargetedHistogramFlag);
// We'll end up leaking these histograms, unless there is some code hiding in
// there to do the dec-ref.
+ // TODO(jar): Handle reference counting in webkit glue.
histogram->AddRef();
return histogram.get();
}
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | net/base/connection_type_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698