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

Unified Diff: chrome/renderer/render_thread.cc

Issue 6780035: Use lock-free lazy initialization for static histogram references (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/renderer/renderer_main.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 80382)
+++ chrome/renderer/render_thread.cc (working copy)
@@ -798,13 +798,9 @@
const char *name, int min, int max, size_t buckets) {
if (min <= 0)
min = 1;
- scoped_refptr<base::Histogram> histogram = base::Histogram::FactoryGet(
+ base::Histogram* histogram = base::Histogram::FactoryGet(
name, min, max, buckets, base::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();
+ return histogram;
}
static void AddHistogramSample(void* hist, int sample) {
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698