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

Unified Diff: chrome/browser/chromeos/external_metrics.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
Index: chrome/browser/chromeos/external_metrics.cc
===================================================================
--- chrome/browser/chromeos/external_metrics.cc (revision 80382)
+++ chrome/browser/chromeos/external_metrics.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -86,7 +86,7 @@
}
// Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram
// instance and thus only work if |name| is constant.
- scoped_refptr<base::Histogram> counter = base::Histogram::FactoryGet(
+ base::Histogram* counter = base::Histogram::FactoryGet(
name, min, max, nbuckets, base::Histogram::kUmaTargetedHistogramFlag);
counter->Add(sample);
}
@@ -101,7 +101,7 @@
}
// Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram
// instance and thus only work if |name| is constant.
- scoped_refptr<base::Histogram> counter = base::LinearHistogram::FactoryGet(
+ base::Histogram* counter = base::LinearHistogram::FactoryGet(
name, 1, max, max + 1, base::Histogram::kUmaTargetedHistogramFlag);
counter->Add(sample);
}
« no previous file with comments | « chrome/browser/chromeos/cros/cros_library_loader.cc ('k') | chrome/browser/extensions/extension_metrics_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698