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

Unified Diff: base/metrics/histogram.h

Issue 6591052: Small cleanup for previous histogram checkin... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « no previous file | base/metrics/histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.h
===================================================================
--- base/metrics/histogram.h (revision 76254)
+++ base/metrics/histogram.h (working copy)
@@ -435,14 +435,15 @@
virtual ~Histogram();
+ // Initialize ranges_ mapping.
+ void InitializeBucketRange();
+
// Method to override to skip the display of the i'th bucket if it's empty.
virtual bool PrintEmptyBucket(size_t index) const;
//----------------------------------------------------------------------------
// Methods to override to create histogram with different bucket widths.
//----------------------------------------------------------------------------
- // Initialize ranges_ mapping.
- virtual void InitializeBucketRange();
// Find bucket to increment for sample value.
virtual size_t BucketIndex(Sample value) const;
// Get normalized size, relative to the ranges_[i].
@@ -576,7 +577,7 @@
TimeDelta maximum, size_t bucket_count);
// Initialize ranges_ mapping.
- virtual void InitializeBucketRange();
+ void InitializeBucketRange();
virtual double GetBucketSize(Count current, size_t i) const;
// If we have a description for a bucket, then return that. Otherwise
@@ -656,8 +657,9 @@
// Register, or add a new histogram to the collection of statistics. If an
// identically named histogram is already registered, then the argument
- // |histogram| will be replaced by the previously registered value.
- static void Register(scoped_refptr<Histogram>* histogram);
+ // |histogram| will be replaced by the previously registered value, discarding
+ // the referenced argument.
+ static void RegisterOrDiscardDuplicate(scoped_refptr<Histogram>* histogram);
// Methods for printing histograms. Only histograms which have query as
// a substring are written to output (an empty string will process all
« no previous file with comments | « no previous file | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698